check for driver_modes == NULL. Don't need driver_modes for EGL driver
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 28 Nov 2005 00:04:35 +0000 (00:04 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 28 Nov 2005 00:04:35 +0000 (00:04 +0000)
src/mesa/drivers/dri/radeon/radeon_screen.c

index 3b7897282075e6414ee617d688eedf5783ec9c2d..213af6d34f8bb28f0a7033b6b1106ccc3249a8aa 100644 (file)
@@ -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