diff options
author | nobled <[email protected]> | 2010-09-07 12:26:07 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2010-09-07 12:26:33 -0400 |
commit | 6561a64a69c0f5005d03ea297f9a309f48449731 (patch) | |
tree | 2f595515804b53e952d59c40f7cd77b9f77aee12 /src/mesa/drivers/dri | |
parent | 1b8c9fef1128cfeee5e5ba75ba7d645522cc76c2 (diff) |
dri: Make it a little clearer that we're not dereferencing a NULL pointer
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 5f079867739..f07c3da4bb6 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -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; |