From 6522fedaa1023939c046fb6e9a1d2f48d30a37c8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 5 Mar 2015 14:18:07 +0000 Subject: [PATCH] sna/dri2: Don't dereference a NULL drawable on client shutdown whilst flipping A dropped if(!NULL) check from the previous patch. Signed-off-by: Chris Wilson --- src/sna/sna_dri2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 1b9622f1..83e652da 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -2533,7 +2533,8 @@ static void sna_dri2_flip_event(struct sna_dri2_event *flip) } } else if (!sna_dri2_flip_continue(flip)) { DBG(("%s: no longer able to flip\n", __FUNCTION__)); - __sna_dri2_copy_event(flip, 0); + if (flip->draw != NULL) + __sna_dri2_copy_event(flip, 0); if (flip->flip_continue == FLIP_COMPLETE) { DBG(("%s: fake triple buffering, unblocking client\n", __FUNCTION__)); frame_swap_complete(flip, DRI2_BLIT_COMPLETE);