summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-09-08 20:55:02 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-09-08 20:55:24 -0400
commitd8ab9aac54c3b6e4d97016172527d4b7c85b27a2 (patch)
tree048eb10f0eca57cc8a83d341db41b264486ffc6e
parent7b34fcc4874671dc92413fa1a091eafac4191cee (diff)
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.
-rw-r--r--src/glx/glx_pbuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index d065f4bb6c..d1cb66b87c 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);
}
}