diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-18 14:37:44 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-18 14:37:44 +0100 |
commit | f5469681b620d9d6ccaf53e92ed31f931cb03b0d (patch) | |
tree | 06317ec55fbac55da6b389e568c6ebc147cf6935 | |
parent | bfacb9d8dcd0fd590af3cb9fddc81904ef1e273b (diff) |
sna: Be defensive during FreeScreen()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 784ab608..4b35fe96 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -1188,7 +1188,7 @@ static void sna_free_screen(FREE_SCREEN_ARGS_DECL) struct sna *sna = to_sna(scrn); DBG(("%s [scrn=%p, sna=%p]\n", __FUNCTION__, scrn, sna)); - if ((uintptr_t)sna & 3) + if (sna == NULL || (uintptr_t)sna & 3) /* beware thieves */ return; scrn->driverPrivate = (void *)((uintptr_t)sna->info | (sna->flags & SNA_IS_SLAVED) | 2); |