diff options
author | Jun Wu <[email protected]> | 2014-06-27 13:42:45 +0800 |
---|---|---|
committer | infirit <[email protected]> | 2014-06-27 11:52:52 +0200 |
commit | 407fbdaff20d140fef51c813d8388897040630c0 (patch) | |
tree | e0dec4b0e5dd67fd8f9986b39bc65b0ddfed0031 /src | |
parent | 351c4c76932abbbf6e235f51fc224c2499c5b3dd (diff) | |
download | mate-notification-daemon-407fbdaff20d140fef51c813d8388897040630c0.tar.bz2 mate-notification-daemon-407fbdaff20d140fef51c813d8388897040630c0.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.
Diffstat (limited to 'src')
-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; |