summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Wu <[email protected]>2014-06-27 13:42:45 +0800
committerJun Wu <[email protected]>2014-06-27 13:42:45 +0800
commitb93ae82a81a562c3190eae72ce09b2c45b88c1b3 (patch)
tree06ece3483efd6670192b5fcff5cbd97aeb0db49b
parent434abab14a314bce1cd262cf68d0ee68bfac2924 (diff)
downloadmate-notification-daemon-b93ae82a81a562c3190eae72ce09b2c45b88c1b3.tar.bz2
mate-notification-daemon-b93ae82a81a562c3190eae72ce09b2c45b88c1b3.tar.xz
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.
-rw-r--r--src/daemon/daemon.c5
1 files changed, 5 insertions, 0 deletions
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;