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 <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
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;