mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-28 03:30:15 +00:00
Fix context sharing between direct/indirect contexts
This commit is contained in:
@@ -614,6 +614,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
||||
else
|
||||
driShare = NULL;
|
||||
|
||||
if (baseShareContext && baseShareContext->isDirect)
|
||||
return NULL;
|
||||
|
||||
context = xalloc(sizeof *context);
|
||||
if (context == NULL)
|
||||
return NULL;
|
||||
@@ -649,6 +652,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
|
||||
hwContext,
|
||||
&context->driContext);
|
||||
|
||||
if (context->driContext.private == NULL) {
|
||||
xfree(context);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &context->base;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user