[gnome-panel] status-notifier: avoid a possible crash in register_host_cb
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] status-notifier: avoid a possible crash in register_host_cb
- Date: Thu, 28 Dec 2017 23:54:16 +0000 (UTC)
commit 5f16dadc9ed1bdc313fa6847e23dc1bbe3e999e6
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri Dec 29 01:27:46 2017 +0200
status-notifier: avoid a possible crash in register_host_cb
sn_watcher_v0_gen_dup_registered_items() can return NULL if
property is not set.
modules/status-notifier/sn-host-v0.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/modules/status-notifier/sn-host-v0.c b/modules/status-notifier/sn-host-v0.c
index 1693e56..6c2d2fa 100644
--- a/modules/status-notifier/sn-host-v0.c
+++ b/modules/status-notifier/sn-host-v0.c
@@ -204,6 +204,8 @@ register_host_cb (GObject *source_object,
G_CALLBACK (item_unregistered_cb), v0);
items = sn_watcher_v0_gen_dup_registered_items (v0->watcher);
+ if (items == NULL)
+ return;
for (i = 0; items[i] != NULL; i++)
add_registered_item (v0, items[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]