From 4b0b250aae6ae7d48cd24f9d91d05ab58086c4b2 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 23 Nov 2009 01:30:32 -0500 Subject: glx: Prevent potential null pointer deference in driCreateContext. --- src/glx/x11/drisw_glx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/glx/x11') 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; -- cgit v1.2.3