aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2005-11-28 00:04:35 +0000
committerBrian Paul <[email protected]>2005-11-28 00:04:35 +0000
commit4f12aa5a6a00a4c3f1e65f8661c657691cfae0e4 (patch)
treefa3be4e623363aa1efba7a73a022da39a9327333
parenta913d9f2f7991b4ae4ac7cc1264efbc11c16237b (diff)
check for driver_modes == NULL. Don't need driver_modes for EGL driver
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 3b789728207..213af6d34f8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -938,10 +938,12 @@ __driCreateNewScreen_20050727( __DRInativeDisplay *dpy,
if ( psp != NULL ) {
RADEONDRIPtr dri_priv = (RADEONDRIPtr) psp->pDevPriv;
- *driver_modes = radeonFillInModes( dri_priv->bpp,
- (dri_priv->bpp == 16) ? 16 : 24,
- (dri_priv->bpp == 16) ? 0 : 8,
- (dri_priv->backOffset != dri_priv->depthOffset) );
+ if (driver_modes) {
+ *driver_modes = radeonFillInModes( dri_priv->bpp,
+ (dri_priv->bpp == 16) ? 16 : 24,
+ (dri_priv->bpp == 16) ? 0 : 8,
+ (dri_priv->backOffset != dri_priv->depthOffset) );
+ }
/* Calling driInitExtensions here, with a NULL context pointer,
* does not actually enable the extensions. It just makes sure