[nautilus/wip/ernestask/leak-plugging] tag-manager: Guard against null notifier
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/ernestask/leak-plugging] tag-manager: Guard against null notifier
- Date: Sat, 6 Oct 2018 17:01:25 +0000 (UTC)
commit a9b799adddb6a3e84446381328a311b6118566b9
Author: Ernestas Kulik <ernestask gnome org>
Date: Sat Oct 6 19:57:09 2018 +0300
tag-manager: Guard against null notifier
tracker_notifier_new() may return a null pointer on error, and that’s
exactly what happens sometimes (CI pipelines,
https://gitlab.gnome.org/GNOME/tracker/issues/43).
src/nautilus-tag-manager.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-tag-manager.c b/src/nautilus-tag-manager.c
index de125ff77..891ad53f4 100644
--- a/src/nautilus-tag-manager.c
+++ b/src/nautilus-tag-manager.c
@@ -875,11 +875,13 @@ nautilus_tag_manager_set_cancellable (NautilusTagManager *self,
TRACKER_NOTIFIER_FLAG_QUERY_LOCATION,
cancellable,
&self->notifier_error);
-
- g_signal_connect (self->notifier,
- "events",
- G_CALLBACK (on_tracker_notifier_events),
- self);
+ if (self->notifier != NULL)
+ {
+ g_signal_connect (self->notifier,
+ "events",
+ G_CALLBACK (on_tracker_notifier_events),
+ self);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]