The GLXIsDirect request will throw GLXBadContext for us if it needs to,
so we can avoid synthesizing an error on the client side.
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7859>
* context then no error is generated but glXImportContextEXT returns
* NULL."
*
- * If contextID is None, generate BadContext on the client-side. Other
- * sorts of invalid contexts will be detected by the server in the
- * __glXIsDirect call.
+ * We can handle both conditions with the __glXIsDirect call, because
+ * passing None to a GLXIsDirect request will throw GLXBadContext.
*/
- if (contextID == None) {
- __glXSendError(dpy, GLXBadContext, contextID, X_GLXIsDirect, false);
- return NULL;
- }
-
if (__glXIsDirect(dpy, contextID, NULL))
return NULL;