sna: Only destroy the cached CLEAR picture if it exists

Reported-by: Reinis Danne
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-03-03 15:32:23 +00:00
parent 2583232773
commit 48a733a35a
1 changed files with 6 additions and 2 deletions

View File

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