summaryrefslogtreecommitdiff
path: root/mate-window-picker-applet/task-item.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-10-03 16:33:30 +0300
committermonsta <[email protected]>2016-10-03 16:33:30 +0300
commitb0dba632e2c1da952661ec67d1ca7821fa40ac7b (patch)
tree483b5775e2ee4e4916b07e9d973f3c02bfddbf7c /mate-window-picker-applet/task-item.c
parent3c33e5cda7f356f47dffc717a900591820ef207c (diff)
downloadmate-netbook-b0dba632e2c1da952661ec67d1ca7821fa40ac7b.tar.bz2
mate-netbook-b0dba632e2c1da952661ec67d1ca7821fa40ac7b.tar.xz
window picker: fix runtime warning about workspace being NULL
from https://github.com/lanoxx/window-picker-applet/commit/8c6de9ded61743246b82a04c2a21c714e50957ef
Diffstat (limited to 'mate-window-picker-applet/task-item.c')
-rw-r--r--mate-window-picker-applet/task-item.c15
1 files 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;
}