diff options
author | Jun Wu <[email protected]> | 2014-06-27 13:42:45 +0800 |
---|---|---|
committer | Jun Wu <[email protected]> | 2014-06-27 13:42:45 +0800 |
commit | b93ae82a81a562c3190eae72ce09b2c45b88c1b3 (patch) | |
tree | 06ece3483efd6670192b5fcff5cbd97aeb0db49b | |
parent | 434abab14a314bce1cd262cf68d0ee68bfac2924 (diff) | |
download | mate-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.c | 5 |
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; |