glx: Be sure to set an error for ghost contexts
Otherwise the caller is going to return garbage memory for the error value. Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
b9f415cbad
commit
9f21872ad8
|
@ -137,8 +137,10 @@ validGlxContext(ClientPtr client, XID id, int access_mode,
|
||||||
__GLXcontext ** context, int *err)
|
__GLXcontext ** context, int *err)
|
||||||
{
|
{
|
||||||
/* no ghost contexts */
|
/* no ghost contexts */
|
||||||
if (id & SERVER_BIT)
|
if (id & SERVER_BIT) {
|
||||||
|
*err = __glXError(GLXBadContext);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
*err = dixLookupResourceByType((void **) context, id,
|
*err = dixLookupResourceByType((void **) context, id,
|
||||||
__glXContextRes, client, access_mode);
|
__glXContextRes, client, access_mode);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user