glx: guard swap-interval functions against destroyed drawables
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 2 Feb 2017 17:06:27 +0000 (18:06 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 6 Feb 2017 16:39:30 +0000 (17:39 +0100)
commitf446f3fb33528eebe9b120340fca3ac5c5ba518d
tree9c4c5a1da5da416a7e1e7bc9e0bfad6f0c6cb417
parent21ec35566be2c1aca07083a67f462618ae15fa86
glx: guard swap-interval functions against destroyed drawables

The GLX specification says about glXDestroyPixmap:

    "The storage for the GLX pixmap will be freed when it is not current
     to any client."

So arguably, functions like glXSwapIntervalMESA can be called after
glXDestroyPixmap has been called for the currently bound GLXPixmap.
In that case, the GLXDRIDrawable no longer exists, and so we just skip
those calls.

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/glx/dri3_glx.c
src/glx/glxcmds.c