glx: Only take a Pixmap reference if creating the GLXPixmap succeeded
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
7ecfab47eb
commit
75b362763c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user