dri2: fix master pixmap free and reset pointer

These are two minor changes, one to reset the pointer to NULL,
after freeing the pixmaps, one to make sure we use the right API for
the master pixmap, though I doubt it'll ever really matter.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Dave Airlie 2012-08-03 16:43:22 +10:00
parent 64623ef90d
commit ac09a4a091

View File

@ -816,8 +816,9 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest)
if (pPriv->prime_slave_pixmap->master_pixmap == mpix)
return &pPriv->prime_slave_pixmap->drawable;
else {
(*master->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap);
(*pPriv->prime_slave_pixmap->master_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_slave_pixmap->master_pixmap);
(*slave->DestroyPixmap)(pPriv->prime_slave_pixmap);
pPriv->prime_slave_pixmap = NULL;
}
}