Don't attempt to Prepare/FinishAccess NULL pDrawables. Exposed by new

gradient testing in rendercheck.
This commit is contained in:
Eric Anholt 2006-03-31 23:22:29 +00:00
parent 2e38fedd29
commit d1e90113fc
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2006-03-31 Eric Anholt <anholt@FreeBSD.org>
* exa/exa_unaccel.c: (ExaCheckComposite):
Don't attempt to Prepare/FinishAccess NULL pDrawables. Exposed by new
gradient testing in rendercheck.
2006-03-31 Eric Anholt <anholt@FreeBSD.org>
* exa/exa.c: (exaGetPixmapOffset), (exaPixmapIsOffscreen),

View File

@ -316,8 +316,9 @@ ExaCheckComposite (CARD8 op,
EXA_FALLBACK(("from picts 0x%lx/0x%lx to pict 0x%lx\n",
(long)pSrc, (long)pMask, (long)pDst));
exaPrepareAccess (pDst->pDrawable, EXA_PREPARE_DEST);
exaPrepareAccess (pSrc->pDrawable, EXA_PREPARE_SRC);
if (pMask)
if (pSrc->pDrawable != NULL)
exaPrepareAccess (pSrc->pDrawable, EXA_PREPARE_SRC);
if (pMask && pMask->pDrawable != NULL)
exaPrepareAccess (pMask->pDrawable, EXA_PREPARE_MASK);
fbComposite (op,
pSrc,
@ -331,9 +332,10 @@ ExaCheckComposite (CARD8 op,
yDst,
width,
height);
if (pMask)
if (pMask && pMask->pDrawable != NULL)
exaFinishAccess (pMask->pDrawable, EXA_PREPARE_MASK);
exaFinishAccess (pSrc->pDrawable, EXA_PREPARE_SRC);
if (pSrc->pDrawable != NULL)
exaFinishAccess (pSrc->pDrawable, EXA_PREPARE_SRC);
exaFinishAccess (pDst->pDrawable, EXA_PREPARE_DEST);
}