From: Kristian Høgsberg Date: Thu, 9 Sep 2010 00:55:02 +0000 (-0400) Subject: glx: Destroy pixmap after destroying glx and dri drawables X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8ab9aac54c3b6e4d97016172527d4b7c85b27a2;p=mesa.git 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. --- 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); } }