mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
present: Avoid crash at server shutdown
When a present flip operation is still in process during server reset, the call to present_set_abort_flip may not happen until the screen is being closed, at which point there is no root window to set pixmaps for. Check to make sure there's a window before resetting window pixmaps. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -399,7 +399,8 @@ present_set_abort_flip(ScreenPtr screen)
|
||||
present_set_tree_pixmap(screen_priv->flip_window,
|
||||
(*screen->GetScreenPixmap)(screen));
|
||||
|
||||
present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen));
|
||||
if (screen->root)
|
||||
present_set_tree_pixmap(screen->root, (*screen->GetScreenPixmap)(screen));
|
||||
|
||||
screen_priv->flip_pending->abort_flip = TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user