diff options
author | Dave Airlie <airlied@redhat.com> | 2012-08-03 16:43:22 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-08-07 08:25:45 +1000 |
commit | ac09a4a091a43188241365152e1244fd8fd93ee7 (patch) | |
tree | 01da71a3d17c1ac236c5a3c0c2e7480bfc9a8085 | |
parent | 64623ef90db649e89345f71871affe7a9606f6ea (diff) |
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>
-rw-r--r-- | hw/xfree86/dri2/dri2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index d60d8ba6c..23f589cdc 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -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; } } |