glx: Prevent potential null pointer deference in driCreateContext.
This commit is contained in:
parent
5b925b7daa
commit
4b0b250aae
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue