[PATCH 7/7] tracker: fix warning due to unref NULL



From: Lionel Landwerlin <lionel g landwerlin linux intel com>

Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
---
 src/tracker/grl-tracker.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/tracker/grl-tracker.c b/src/tracker/grl-tracker.c
index 8b6e8f4..73317d3 100644
--- a/src/tracker/grl-tracker.c
+++ b/src/tracker/grl-tracker.c
@@ -285,7 +285,8 @@ grl_tracker_source_set_property (GObject      *object,
 
   switch (propid) {
   case PROP_TRACKER_CONNECTION:
-    g_object_unref (G_OBJECT (priv->tracker_connection));
+    if (priv->tracker_connection != NULL)
+      g_object_unref (G_OBJECT (priv->tracker_connection));
     priv->tracker_connection = g_object_ref (g_value_get_object (value));
     break;
 
-- 
1.7.2.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]