diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index cf546cc86dd..fcd82bab4a4 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -276,7 +276,8 @@ glx_context_init(struct glx_context *gc, * * \param dpy Display where the context was created. * \param contextID ID of the context to be tested. - * \param error Out parameter, set to True on error if not NULL + * \param error Out parameter, set to True on error if not NULL, + * otherwise raise the error to the application. * * \returns \c True if the context is direct rendering or not. */ @@ -301,7 +302,8 @@ __glXIsDirect(Display * dpy, GLXContextID contextID, Bool *error) if (err != NULL) { if (error) *error = True; - __glXSendErrorForXcb(dpy, err); + else + __glXSendErrorForXcb(dpy, err); free(err); }