Don't clear info->flip_window in present_unflip

present_unflip can get called between present_check_flip and
present_flip, in which case the latter would pass a NULL WindowPtr to
the former, resulting in a crash.

present_flip should never get called for a window which has already been
destroyed, so there's no need to clear info->flip_window.

Bugzilla: https://bugs.freedesktop.org/109067
Fixes: 2d18b37159 "Check last flip window instead of screen root
                      before flipping"
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2018-12-18 16:42:53 +01:00
committed by Michel Dänzer
parent d4eab5d108
commit 233a0be82d

View File

@@ -389,7 +389,6 @@ amdgpu_present_unflip(ScreenPtr screen, uint64_t event_id)
FLIP_ASYNC : FLIP_VSYNC;
int i;
info->flip_window = NULL;
info->drmmode.vrr_flipping = FALSE;
amdgpu_present_set_screen_vrr(scrn);