From 578b1c06c7c3ee63c59a2e98e84579c168686d7c Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 13 Mar 2012 00:37:31 -0400 Subject: [PATCH] window: Fix meta_window_get_workspaces when a window isn't on a workspace Since we're going to be evaluating the work area at startup now, we need to make sure that we don't iterate over workspaces before they're assigned. The easiest way to do this is to make sure that meta_window_get_workspaces doesn't crash. https://bugzilla.gnome.org/show_bug.cgi?id=643606 --- src/core/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/window.c b/src/core/window.c index ff09914ad..c237c0d1c 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -7475,8 +7475,10 @@ meta_window_get_workspaces (MetaWindow *window) { if (window->on_all_workspaces) return window->screen->workspaces; - else + else if (window->workspace != NULL) return window->workspace->list_containing_self; + else + return NULL; } static void