summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2009-11-23 01:30:32 -0500
committerVinson Lee <vlee@vmware.com>2009-11-23 01:30:32 -0500
commit4b0b250aae6ae7d48cd24f9d91d05ab58086c4b2 (patch)
treeb6edff659adf2ce04718e4a2766d84837725b30d /src/glx
parent5b925b7daa566d799c4f50911a7fcca114131503 (diff)
downloadexternal_mesa3d-4b0b250aae6ae7d48cd24f9d91d05ab58086c4b2.zip
external_mesa3d-4b0b250aae6ae7d48cd24f9d91d05ab58086c4b2.tar.gz
external_mesa3d-4b0b250aae6ae7d48cd24f9d91d05ab58086c4b2.tar.bz2
glx: Prevent potential null pointer deference in driCreateContext.
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/drisw_glx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index 15e1586..1866b2c 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -250,12 +250,14 @@ driCreateContext(__GLXscreenConfigs * psc,
{
__GLXDRIcontextPrivate *pcp, *pcp_shared;
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode;
- const __DRIcoreExtension *core = psc->core;
+ const __DRIcoreExtension *core;
__DRIcontext *shared = NULL;
if (!psc || !psc->driScreen)
return NULL;
+ core = psc->core;
+
if (shareList) {
pcp_shared = (__GLXDRIcontextPrivate *) shareList->driContext;
shared = pcp_shared->driContext;