From b93ae82a81a562c3190eae72ce09b2c45b88c1b3 Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Fri, 27 Jun 2014 13:42:45 +0800 Subject: Fix assertion WNCK_IS_WORKSPACE Some window manager such as i3-wm may cause wnck_screen_get_active_workspace to return NULL. Add a sanity check before using the return value. --- src/daemon/daemon.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index c1c7018..49368f2 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -1162,6 +1162,11 @@ static gboolean fullscreen_window_exists(GtkWidget* nw) wnck_workspace = wnck_screen_get_active_workspace (wnck_screen); + if (!wnck_workspace) + { + return FALSE; + } + for (l = wnck_screen_get_windows_stacked (wnck_screen); l != NULL; l = l->next) { WnckWindow *wnck_win = (WnckWindow *) l->data; -- cgit v1.2.1