summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-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 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);
}
}