summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glx/drisw_glx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 2f0675addb4..df2467a5c2d 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -255,11 +255,9 @@ drisw_bind_context(struct glx_context *context, struct glx_context *old,
driReleaseDrawables(&pcp->base);
- if (pdraw == NULL || pread == NULL)
- return GLXBadDrawable;
-
if ((*psc->core->bindContext) (pcp->driContext,
- pdraw->driDrawable, pread->driDrawable))
+ pdraw ? pdraw->driDrawable : NULL,
+ pread ? pread->driDrawable : NULL))
return Success;
return GLXBadContext;