From 033cfb17db85b38bc012d74f30f6c92cddf85216 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 9 Nov 2017 16:57:30 -0500 Subject: glx/drisw: Fix glXMakeCurrent(dpy, None, ctx) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is perfectly legal in GL 3.0+. Fixes piglit/glx-create-context-current-no-framebuffer. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Tapani Pälli Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson --- src/glx/drisw_glx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/glx/drisw_glx.c') 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; -- cgit v1.2.3