raveit65 bba250f
From 6cef297f2b219883946d4ea4dec998cdfb2c57e8 Mon Sep 17 00:00:00 2001
raveit65 bba250f
From: rcaridade145 <rcaridade145@gmail.com>
raveit65 bba250f
Date: Sat, 29 Feb 2020 12:01:51 +0000
raveit65 bba250f
Subject: [PATCH 1/4] window: fix crash if workspace is null
raveit65 bba250f
raveit65 bba250f
Based on commit https://gitlab.gnome.org/GNOME/metacity/-/commit/24d35569bdb78d1da3b53ed1a6d81d365d60bed0
raveit65 bba250f
---
raveit65 bba250f
 src/core/window.c | 3 ++-
raveit65 bba250f
 1 file changed, 2 insertions(+), 1 deletion(-)
raveit65 bba250f
raveit65 bba250f
diff --git a/src/core/window.c b/src/core/window.c
raveit65 bba250f
index 99ac36b8..30263e96 100644
raveit65 bba250f
--- a/src/core/window.c
raveit65 bba250f
+++ b/src/core/window.c
raveit65 bba250f
@@ -2102,9 +2102,10 @@ windows_overlap (const MetaWindow *w1, const MetaWindow *w2)
raveit65 bba250f
 static gboolean
raveit65 bba250f
 window_would_be_covered (const MetaWindow *newbie)
raveit65 bba250f
 {
raveit65 bba250f
-  MetaWorkspace *workspace = newbie->workspace;
raveit65 bba250f
+  MetaWorkspace *workspace;
raveit65 bba250f
   GList *tmp, *windows;
raveit65 bba250f
 
raveit65 bba250f
+  workspace = meta_window_get_workspace ((MetaWindow *) newbie);
raveit65 bba250f
   windows = meta_workspace_list_windows (workspace);
raveit65 bba250f
 
raveit65 bba250f
   tmp = windows;
raveit65 bba250f
-- 
raveit65 bba250f
2.21.1
raveit65 bba250f