This can get called on the DestroyPixmap path too.  DRI1 doesn't
actually implement GLX Pixmaps, so let's just stumble through.

Signed-off-by: Adam Jackson <a...@redhat.com>
---
 glx/glxdri.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/glx/glxdri.c b/glx/glxdri.c
index 326f539..f6ef784 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -230,7 +230,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
 
     /* If the X window was destroyed, the dri DestroyWindow hook will
      * aready have taken care of this, so only call if pDraw isn't NULL. */
-    if (drawable->pDraw != NULL) {
+    if (drawable->pDraw != NULL && drawable->pDraw->type == DRAWABLE_WINDOW) {
        screen = (__GLXDRIscreen *) glxGetScreen(drawable->pDraw->pScreen);
        (*screen->core->destroyDrawable)(private->driDrawable);
 
-- 
1.7.6.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to