OSDN Git Service

glx: fix error code when there is no context bound
[android-x86/external-mesa.git] / src / glx / glx_pbuffer.c
index a0c1e3d..24c073c 100644 (file)
@@ -328,7 +328,7 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
        *   the calling thread's current context a GLXBadDrawable error is
        *   generated."
        */
-      if (pdraw == NULL || gc == NULL || gc->currentDpy != dpy ||
+      if (pdraw == NULL || gc == &dummyContext || gc->currentDpy != dpy ||
          (gc->currentDrawable != drawable &&
          gc->currentReadable != drawable)) {
          __glXSendError(dpy, GLXBadDrawable, drawable,