summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2017-04-12 14:21:49 +0800
committerJonas Ådahl <jadahl@gmail.com>2017-08-30 13:09:38 +0800
commit7562eb600659e86304d90f3fe666116a081c75ea (patch)
tree90ea231c81e2179a2496912cd65d9a72c280fe69
parent0aa7405a2a895719fb7365d563cfbc1da69536ff (diff)
downloadmutter-7562eb600659e86304d90f3fe666116a081c75ea.tar.gz
core/window: Don't set a preferred output when there is none
If there are no active logical monitors, don't try to dereference a NULL one to get a preferred output winsys id. Instead just set an invalid one. https://bugzilla.gnome.org/show_bug.cgi?id=730551
-rw-r--r--src/core/window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/window.c b/src/core/window.c
index ec3083f80..f3ff8fd5b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1039,7 +1039,10 @@ _meta_window_shared_new (MetaDisplay *display,
window->compositor_private = NULL;
window->monitor = meta_window_calculate_main_logical_monitor (window);
- window->preferred_output_winsys_id = window->monitor->winsys_id;
+ if (window->monitor)
+ window->preferred_output_winsys_id = window->monitor->winsys_id;
+ else
+ window->preferred_output_winsys_id = UINT_MAX;
window->tile_match = NULL;