mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +03:00
Fix a crash when meta_window is null (#780)
This may happen when there's an open menu and the user changes workspace. Fixes #766
This commit is contained in:
parent
90c47261ee
commit
3f7cb0e251
@ -2106,9 +2106,10 @@ namespace Gala {
|
||||
continue;
|
||||
}
|
||||
|
||||
unowned Meta.Window meta_window = window.get_meta_window ();
|
||||
unowned Meta.Window? meta_window = window.get_meta_window ();
|
||||
if (!window.is_destroyed ()) {
|
||||
if (meta_window.get_window_type () == Meta.WindowType.NOTIFICATION) {
|
||||
if (meta_window != null
|
||||
&& meta_window.get_window_type () == Meta.WindowType.NOTIFICATION) {
|
||||
reparent_notification_window (actor, parents.nth_data (i));
|
||||
} else {
|
||||
clutter_actor_reparent (actor, parents.nth_data (i));
|
||||
@ -2119,7 +2120,8 @@ namespace Gala {
|
||||
|
||||
kill_window_effects (window);
|
||||
|
||||
if (meta_window.get_workspace () != active_workspace
|
||||
if (meta_window != null
|
||||
&& meta_window.get_workspace () != active_workspace
|
||||
&& !meta_window.is_on_all_workspaces ())
|
||||
window.hide ();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user