dri: Make it a little clearer that we're not dereferencing a NULL pointer
This commit is contained in:
parent
1b8c9fef11
commit
6561a64a69
|
@ -635,6 +635,7 @@ dri2CreateNewContextForAPI(__DRIscreen *screen, int api,
|
|||
__DRIcontext *shared, void *data)
|
||||
{
|
||||
__DRIcontext *context;
|
||||
const __GLcontextModes *modes = (config != NULL) ? &config->modes : NULL;
|
||||
void *shareCtx = (shared != NULL) ? shared->driverPrivate : NULL;
|
||||
gl_api mesa_api;
|
||||
|
||||
|
@ -663,7 +664,7 @@ dri2CreateNewContextForAPI(__DRIscreen *screen, int api,
|
|||
context->driDrawablePriv = NULL;
|
||||
context->loaderPrivate = data;
|
||||
|
||||
if (!(*screen->DriverAPI.CreateContext)(mesa_api, &config->modes,
|
||||
if (!(*screen->DriverAPI.CreateContext)(mesa_api, modes,
|
||||
context, shareCtx) ) {
|
||||
free(context);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue