diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2017-10-07 00:33:39 -0400 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2017-10-07 00:36:03 -0400 |
commit | 6eb7d138940c44793d424619e86eab4007e2572c (patch) | |
tree | 71e8e41da778d8ac23048df951de9507633e6d8d /src | |
parent | 7928b25ebfa386e9e9360c85f3cb58f38d5ebc7c (diff) | |
download | mutter-6eb7d138940c44793d424619e86eab4007e2572c.tar.gz |
window: Handle updating from no to no monitor
When we received two hot plug events that both resulted in headless
configuration, we tried to find a new window monitor given the old.
That resulted in a null pointer dereference; avoid that by only trying
to find the same monitor if there was an old one.
https://bugzilla.gnome.org/show_bug.cgi?id=788607
Diffstat (limited to 'src')
-rw-r--r-- | src/core/window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/window.c b/src/core/window.c index dc60a667c..c2d9869d2 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -3793,7 +3793,7 @@ meta_window_update_for_monitors_changed (MetaWindow *window) new = find_monitor_by_winsys_id (window, window->preferred_output_winsys_id); /* Otherwise, try to find the old output on a new monitor */ - if (!new) + if (old && !new) new = find_monitor_by_winsys_id (window, old->winsys_id); /* Fall back to primary if everything else failed */ |