From af87f6367ef733d1a4f3cfca4eeb92bfd84c2b6f Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Sun, 30 Jan 2011 14:06:15 +0100 Subject: [PATCH] exa: Only call driver FinishAccess hook if PrepareAccess hook succeeded. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Signed-off-by: Maarten Maathuis Signed-off-by: Keith Packard --- exa/exa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exa/exa.c b/exa/exa.c index 8adf8473c..a4e294a71 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -421,7 +421,8 @@ exaFinishAccess(DrawablePtr pDrawable, int index) /* We always hide the devPrivate.ptr. */ pPixmap->devPrivate.ptr = NULL; - if (!pExaScr->info->FinishAccess || !exaPixmapHasGpuCopy(pPixmap)) + /* Only call FinishAccess if PrepareAccess was called and succeeded. */ + if (!pExaScr->info->FinishAccess || !pExaScr->access[i].retval) return; if (i >= EXA_PREPARE_AUX_DEST &&