Fix embarrasing GLXPixmap leak.
This commit is contained in:
parent
c74ddc87c9
commit
d5ae85b5b7
|
@ -1226,10 +1226,6 @@ static int DoDestroyDrawable(__GLXclientState *cl, XID glxdrawable, int type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == GLX_DRAWABLE_PIXMAP) {
|
|
||||||
((PixmapPtr) pGlxDraw->pDraw)->refcnt--;
|
|
||||||
}
|
|
||||||
|
|
||||||
FreeResource(glxdrawable, FALSE);
|
FreeResource(glxdrawable, FALSE);
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
|
|
@ -107,6 +107,11 @@ static int ContextGone(__GLXcontext* cx, XID id)
|
||||||
*/
|
*/
|
||||||
static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
|
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->pDraw = NULL;
|
||||||
glxPriv->drawId = 0;
|
glxPriv->drawId = 0;
|
||||||
__glXUnrefDrawable(glxPriv);
|
__glXUnrefDrawable(glxPriv);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user