summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-12-28 20:22:18 -0500
committermonsta <[email protected]>2018-01-06 14:50:20 +0300
commite4e76688ca09448adaa152e0a757e4f0ee14cf52 (patch)
tree27cab4ae59dc7c6da79b6c9576694a9cf573948b
parentced73759eb90429eef218beb0e4b323bf05cff13 (diff)
downloadmate-panel-e4e76688ca09448adaa152e0a757e4f0ee14cf52.tar.bz2
mate-panel-e4e76688ca09448adaa152e0a757e4f0ee14cf52.tar.xz
status-notifier: properly handle the NULL case for items
patch by https://github.com/supermaz
-rw-r--r--applets/notification_area/status-notifier/sn-host-v0.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/applets/notification_area/status-notifier/sn-host-v0.c b/applets/notification_area/status-notifier/sn-host-v0.c
index 9915b1e3..afdc75e8 100644
--- a/applets/notification_area/status-notifier/sn-host-v0.c
+++ b/applets/notification_area/status-notifier/sn-host-v0.c
@@ -223,8 +223,10 @@ register_host_cb (GObject *source_object,
items = sn_watcher_v0_gen_dup_registered_items (v0->watcher);
- for (i = 0; items[i] != NULL; i++)
- add_registered_item (v0, items[i]);
+ if (items) {
+ for (i = 0; items[i] != NULL; i++)
+ add_registered_item (v0, items[i]);
+ }
g_strfreev (items);
}