glx: Prevent potential null pointer deference in driCreateContext.
(cherry picked from commit 4b0b250aae
)
This commit is contained in:
parent
978b80c8e3
commit
76b3523d75
|
@ -250,12 +250,14 @@ driCreateContext(__GLXscreenConfigs * psc,
|
||||||
{
|
{
|
||||||
__GLXDRIcontextPrivate *pcp, *pcp_shared;
|
__GLXDRIcontextPrivate *pcp, *pcp_shared;
|
||||||
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode;
|
__GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode;
|
||||||
const __DRIcoreExtension *core = psc->core;
|
const __DRIcoreExtension *core;
|
||||||
__DRIcontext *shared = NULL;
|
__DRIcontext *shared = NULL;
|
||||||
|
|
||||||
if (!psc || !psc->driScreen)
|
if (!psc || !psc->driScreen)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
core = psc->core;
|
||||||
|
|
||||||
if (shareList) {
|
if (shareList) {
|
||||||
pcp_shared = (__GLXDRIcontextPrivate *) shareList->driContext;
|
pcp_shared = (__GLXDRIcontextPrivate *) shareList->driContext;
|
||||||
shared = pcp_shared->driContext;
|
shared = pcp_shared->driContext;
|
||||||
|
|
Loading…
Reference in New Issue