From 4f12aa5a6a00a4c3f1e65f8661c657691cfae0e4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 28 Nov 2005 00:04:35 +0000 Subject: check for driver_modes == NULL. Don't need driver_modes for EGL driver --- src/mesa/drivers/dri/radeon/radeon_screen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 3b78972820..213af6d34f 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 -- cgit v1.2.3