[mutter] window: Fix meta_window_get_workspaces when a window isn't on a workspace
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Fix meta_window_get_workspaces when a window isn't on a workspace
- Date: Sat, 17 Mar 2012 01:32:28 +0000 (UTC)
commit 578b1c06c7c3ee63c59a2e98e84579c168686d7c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Mar 13 00:37:31 2012 -0400
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 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index ff09914..c237c0d 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]