summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/omap_exa.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/omap_exa.c b/src/omap_exa.c
index 3d175fa..15c396f 100644
--- a/src/omap_exa.c
+++ b/src/omap_exa.c
@@ -75,8 +75,13 @@ _X_EXPORT void
OMAPDestroyPixmap(ScreenPtr pScreen, void *driverPriv)
{
OMAPPixmapPrivPtr priv = driverPriv;
+ OMAPPtr pOMAP = OMAPPTR_FROM_SCREEN(pScreen);
- omap_bo_del(priv->bo);
+ /* scanout buffer is deleted elsewhere.. some refcnt'ing would
+ * make this a bit cleaner..
+ */
+ if (priv->bo != pOMAP->scanout)
+ omap_bo_del(priv->bo);
free(priv);
}