From 4ac640e3d207ab84ee4468c7017e5410b7a05d7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Tue, 16 Aug 2016 15:35:44 +0900 Subject: [PATCH] glx: Don't use current context in __glXSendError MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There's no guarantee that there is one, and we don't need one anyway. Fixes piglit tests: glx@glx-fbconfig-bad glx@glx_ext_import_context@import context, multi process glx@glx_ext_import_context@import context, single process Fixes: 2e3f067458e4 ("glx: fix error code when there is no context bound") Cc: "11.2" Reviewed-by: Tapani Pälli --- src/glx/glx_error.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/glx/glx_error.c b/src/glx/glx_error.c index e098682dd75..653cbeb2d2a 100644 --- a/src/glx/glx_error.c +++ b/src/glx/glx_error.c @@ -39,11 +39,9 @@ __glXSendError(Display * dpy, int_fast8_t errorCode, uint_fast32_t resourceID, uint_fast16_t minorCode, bool coreX11error) { struct glx_display *glx_dpy = __glXInitialize(dpy); - struct glx_context *gc = __glXGetCurrentContext(); xError error; assert(glx_dpy); - assert(gc != &dummyContext); LockDisplay(dpy); @@ -59,7 +57,7 @@ __glXSendError(Display * dpy, int_fast8_t errorCode, uint_fast32_t resourceID, error.sequenceNumber = dpy->request; error.resourceID = resourceID; error.minorCode = minorCode; - error.majorCode = gc ? gc->majorOpcode : 0; + error.majorCode = glx_dpy->majorOpcode; _XError(dpy, &error); -- 2.30.2