From d8ab9aac54c3b6e4d97016172527d4b7c85b27a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 8 Sep 2010 20:55:02 -0400 Subject: [PATCH] glx: Destroy pixmap after destroying glx and dri drawables Now that we suppress BadDrawable from DRI2DestroyDrawable, this doesn't matter, but we would get that error before when destroying pbuffers. --- src/glx/glx_pbuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index d065f4bb6c0..d1cb66b87ca 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -222,10 +222,10 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable) __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable); if (pdraw != NULL) { - if (destroy_xdrawable) - XFreePixmap(pdraw->psc->dpy, pdraw->xDrawable); (*pdraw->destroyDrawable) (pdraw); __glxHashDelete(priv->drawHash, drawable); + if (destroy_xdrawable) + XFreePixmap(pdraw->psc->dpy, pdraw->xDrawable); } } -- 2.30.2