[mutter] window: Handle maximize when headless



commit 582b67a2f1dde4dab7276cce30c6c40ff929da18
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Jan 9 11:52:18 2019 +0100

    window: Handle maximize when headless
    
    When for some reason a window is maximized while the compositor is
    headless, `window->monitor` will be NULL, so check for a NULL monitor
    to avoid a NULL-pointer dereference.
    
    Closes: https://gitlab.gnome.org/GNOME/mutter/issues/58
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/383

 src/core/window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 9a8a84a26..7f208c3a2 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2848,7 +2848,7 @@ meta_window_maximize_internal (MetaWindow        *window,
   meta_window_recalc_features (window);
   set_net_wm_state (window);
 
-  if (window->monitor->in_fullscreen)
+  if (window->monitor && window->monitor->in_fullscreen)
     meta_display_queue_check_fullscreen (window->display);
 
   g_object_freeze_notify (G_OBJECT (window));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]