summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
Diffstat (limited to 'glx')
-rw-r--r--glx/glxcmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 73e76ca9f..df738b147 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1249,7 +1249,8 @@ DoCreateGLXPixmap(ClientPtr client, __GLXscreen * pGlxScreen,
err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId,
glxDrawableId, GLX_DRAWABLE_PIXMAP);
- ((PixmapPtr) pDraw)->refcnt++;
+ if (err == Success)
+ ((PixmapPtr) pDraw)->refcnt++;
return err;
}