summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2006-03-31 23:22:29 +0000
committerEric Anholt <anholt@freebsd.org>2006-03-31 23:22:29 +0000
commitd1e90113fc32b6ddc4dbe1a074763c31bc133e75 (patch)
treebb588dc3b81285c5fa482ea326cbc4b4533fe468 /exa
parent2e38fedd29e7e55d01e3edce6a73b8ceaac17911 (diff)
Don't attempt to Prepare/FinishAccess NULL pDrawables. Exposed by new
gradient testing in rendercheck.
Diffstat (limited to 'exa')
-rw-r--r--exa/exa_unaccel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index bfd0007bb..fcce67b91 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -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);
}