exa: Only call driver FinishAccess hook if PrepareAccess hook succeeded.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Maarten Maathuis 2011-01-30 14:06:15 +01:00 committed by Keith Packard
parent 648d4fe517
commit af87f6367e
1 changed files with 2 additions and 1 deletions

View File

@ -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 &&