From b0dba632e2c1da952661ec67d1ca7821fa40ac7b Mon Sep 17 00:00:00 2001 From: monsta Date: Mon, 3 Oct 2016 16:33:30 +0300 Subject: window picker: fix runtime warning about workspace being NULL from https://github.com/lanoxx/window-picker-applet/commit/8c6de9ded61743246b82a04c2a21c714e50957ef --- mate-window-picker-applet/task-item.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mate-window-picker-applet/task-item.c b/mate-window-picker-applet/task-item.c index 2096aa4..e9d0085 100644 --- a/mate-window-picker-applet/task-item.c +++ b/mate-window-picker-applet/task-item.c @@ -178,13 +178,16 @@ task_item_set_visibility (TaskItem *item) if (!wnck_window_is_skip_tasklist (window)) { - if (wnck_workspace_is_virtual (workspace)) + if (workspace != NULL) { - show_window = wnck_window_is_in_viewport (window, workspace); - } - else - { - show_window = wnck_window_is_on_workspace (window, workspace); + if (wnck_workspace_is_virtual (workspace)) + { + show_window = wnck_window_is_in_viewport (window, workspace); + } + else + { + show_window = wnck_window_is_on_workspace (window, workspace); + } } show_window = show_window || show_all; } -- cgit v1.2.1