diff options
author | lukefromdc <[email protected]> | 2017-12-28 20:22:18 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2017-12-28 20:22:18 -0500 |
commit | 45a11a76d63de53a556c1f112e7db90e2d8bbf39 (patch) | |
tree | f5b11ed8e97f758bc37d0146d468061d4442d165 /applets/notification_area/status-notifier/sn-host-v0.c | |
parent | e5c8646d8f6167fe2d3634a4604a1bf9ec8ee5af (diff) | |
download | mate-panel-45a11a76d63de53a556c1f112e7db90e2d8bbf39.tar.bz2 mate-panel-45a11a76d63de53a556c1f112e7db90e2d8bbf39.tar.xz |
status-notifier: properly handle the NULL case for items
patch by https://github.com/supermaz
Diffstat (limited to 'applets/notification_area/status-notifier/sn-host-v0.c')
-rw-r--r-- | applets/notification_area/status-notifier/sn-host-v0.c | 6 |
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); } |