Fix embarrasing GLXPixmap leak.

(cherry picked from commit d5ae85b5b7)
This commit is contained in:
Kristian Høgsberg 2008-07-21 15:28:50 -04:00 committed by Adam Jackson
parent ceffece78b
commit e4cfdc07f4
2 changed files with 5 additions and 4 deletions

View File

@ -1223,10 +1223,6 @@ static int DoDestroyDrawable(__GLXclientState *cl, XID glxdrawable, int type)
}
}
if (type == GLX_DRAWABLE_PIXMAP) {
((PixmapPtr) pGlxDraw->pDraw)->refcnt--;
}
FreeResource(glxdrawable, FALSE);
return Success;

View File

@ -107,6 +107,11 @@ static int ContextGone(__GLXcontext* cx, XID id)
*/
static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
{
ScreenPtr pScreen = glxPriv->pDraw->pScreen;
if (glxPriv->type == GLX_DRAWABLE_PIXMAP)
(*pScreen->DestroyPixmap)((PixmapPtr) glxPriv->pDraw);
glxPriv->pDraw = NULL;
glxPriv->drawId = 0;
__glXUnrefDrawable(glxPriv);