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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-03-05 14:18:07 +00:00
parent 72d208a7f2
commit 6522fedaa1
1 changed files with 2 additions and 1 deletions

View File

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