Mesa (master): glx: Destroy pixmap after destroying glx and dri drawables

Kristian Høgsberg krh at kemper.freedesktop.org
Thu Sep 9 00:56:44 UTC 2010


Module: Mesa
Branch: master
Commit: d8ab9aac54c3b6e4d97016172527d4b7c85b27a2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d8ab9aac54c3b6e4d97016172527d4b7c85b27a2

Author: Kristian Høgsberg <krh at bitplanet.net>
Date:   Wed Sep  8 20:55:02 2010 -0400

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 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index d065f4b..d1cb66b 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);
    }
 }
 




More information about the mesa-commit mailing list