From: Brian Paul Date: Mon, 28 Nov 2005 00:04:35 +0000 (+0000) Subject: check for driver_modes == NULL. Don't need driver_modes for EGL driver X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f12aa5a6a00a4c3f1e65f8661c657691cfae0e4;p=mesa.git check for driver_modes == NULL. Don't need driver_modes for EGL driver --- 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