summaryrefslogtreecommitdiff
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
parent2e38fedd29e7e55d01e3edce6a73b8ceaac17911 (diff)
Don't attempt to Prepare/FinishAccess NULL pDrawables. Exposed by new
gradient testing in rendercheck.
-rw-r--r--ChangeLog6
-rw-r--r--exa/exa_unaccel.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 65e5b03f9..4cd29c0ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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),
(exaPrepareAccess), (exaFinishAccess), (exaDriverInit):
* exa/exa_accel.c: (exaPutImage):
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);
}