Commit 9f21872a authored by Adam Jackson's avatar Adam Jackson 🎧
Browse files

glx: Be sure to set an error for ghost contexts

Otherwise the caller is going to return garbage memory for the error
Signed-off-by: Adam Jackson's avatarAdam Jackson <>
parent b9f415cb
......@@ -137,8 +137,10 @@ validGlxContext(ClientPtr client, XID id, int access_mode,
__GLXcontext ** context, int *err)
/* no ghost contexts */
if (id & SERVER_BIT)
if (id & SERVER_BIT) {
*err = __glXError(GLXBadContext);
return FALSE;
*err = dixLookupResourceByType((void **) context, id,
__glXContextRes, client, access_mode);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment