mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
display: Check we have a screen before freeing it
The reason for the display to be closed may be meta_screen_new() returning NULL, in which case we don't have a screen to free. Avoid a segfault on exit by adding a proper check. https://bugzilla.gnome.org/show_bug.cgi?id=778831
This commit is contained in:
parent
1b0a3f11f9
commit
e1ffe15d94
@ -1129,7 +1129,9 @@ meta_display_close (MetaDisplay *display,
|
||||
meta_display_free_events_x11 (display);
|
||||
meta_display_free_events (display);
|
||||
|
||||
meta_screen_free (display->screen, timestamp);
|
||||
if (display->screen)
|
||||
meta_screen_free (display->screen, timestamp);
|
||||
display->screen = NULL;
|
||||
|
||||
/* Must be after all calls to meta_window_unmanage() since they
|
||||
* unregister windows
|
||||
|
Loading…
Reference in New Issue
Block a user