[PATCH 1/2] tracker: avoid warning with tracker bus backend



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

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

diff --git a/src/media/tracker/grl-tracker-media-notif.c b/src/media/tracker/grl-tracker-media-notif.c
index 615e299..8ed574b 100644
--- a/src/media/tracker/grl-tracker-media-notif.c
+++ b/src/media/tracker/grl-tracker-media-notif.c
@@ -408,7 +408,7 @@ tracker_evt_preupdate_sources_item_cb (GObject              *object,
                                        tracker_evt_update_t *evt)
 {
   const gchar *type, *datasource, *uri, *datasource_name;
-  gboolean source_available;
+  gboolean source_available = TRUE;
   GrlTrackerMedia *source;
   GError *error = NULL;
 
@@ -437,7 +437,8 @@ tracker_evt_preupdate_sources_item_cb (GObject              *object,
   datasource = tracker_sparql_cursor_get_string (evt->cursor, 1, NULL);
   datasource_name = tracker_sparql_cursor_get_string (evt->cursor, 2, NULL);
   uri = tracker_sparql_cursor_get_string (evt->cursor, 3, NULL);
-  source_available = tracker_sparql_cursor_get_boolean (evt->cursor, 4);
+  if (tracker_sparql_cursor_is_bound (evt->cursor, 4))
+    source_available = tracker_sparql_cursor_get_boolean (evt->cursor, 4);
 
   source = grl_tracker_media_find (datasource);
 
-- 
1.7.4.1



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