mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 16:44:52 +00:00
present: Only call restore_screen_pixmap once from set_abort_flip
present_restore_screen_pixmap's work doesn't need to be done several times for the same pending flip. Fixes a crash if the X server quits while a flip is pending, in which case present_set_abort_flip may be called several times, including when screen->root is already cleared to NULL. Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
committed by
Michel Dänzer
parent
b4e46c0444
commit
0924ac014d
@@ -455,9 +455,10 @@ present_set_abort_flip(ScreenPtr screen)
|
||||
{
|
||||
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
|
||||
|
||||
present_restore_screen_pixmap(screen);
|
||||
|
||||
screen_priv->flip_pending->abort_flip = TRUE;
|
||||
if (!screen_priv->flip_pending->abort_flip) {
|
||||
present_restore_screen_pixmap(screen);
|
||||
screen_priv->flip_pending->abort_flip = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user