summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-03-03 15:32:23 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-03-03 15:32:23 +0000
commit48a733a35a2de36664a42384d066c06f54cf2ad7 (patch)
tree89cbdfa2f09709f06c6d35b5dfc7f472be10c2c9
parent2583232773f1fa505e0676f07b029b29b90c8ea7 (diff)
sna: Only destroy the cached CLEAR picture if it exists
Reported-by: Reinis Danne Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_composite.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 916d6da5..2b46f628 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -55,8 +55,12 @@ bool sna_composite_create(struct sna *sna)
void sna_composite_close(struct sna *sna)
{
- FreePicture(sna->clear, 0);
- sna->clear = NULL;
+ DBG(("%s\n", __FUNCTION__));
+
+ if (sna->clear) {
+ FreePicture(sna->clear, 0);
+ sna->clear = NULL;
+ }
}
static inline bool