diff options
author | Vinson Lee <[email protected]> | 2009-11-23 01:30:32 -0500 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-12-06 00:56:20 -0800 |
commit | 76b3523d752968bc552d4350a39b9b9b1a023cf0 (patch) | |
tree | 253639f44f4added4be33fdcad6045915bc87bbb /src/glx | |
parent | 978b80c8e35b465273921a28540ed15f07d1afbf (diff) |
glx: Prevent potential null pointer deference in driCreateContext.
(cherry picked from commit 4b0b250aae6ae7d48cd24f9d91d05ab58086c4b2)
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/x11/drisw_glx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c index 15e15866582..1866b2cc870 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; |