[grilo-plugins] tracker: avoid warnings when tracker:available is not set



commit 3bbe5b429fa4b71f8b60f71f85dfec3dcf14660f
Author: Lionel Landwerlin <lionel g landwerlin linux intel com>
Date:   Sun Mar 13 03:08:36 2011 +0100

    tracker: avoid warnings when tracker:available is not set
    
    Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>

 src/media/tracker/grl-tracker-media.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/media/tracker/grl-tracker-media.c b/src/media/tracker/grl-tracker-media.c
index 39ab906..6e6e389 100644
--- a/src/media/tracker/grl-tracker-media.c
+++ b/src/media/tracker/grl-tracker-media.c
@@ -257,7 +257,7 @@ tracker_get_datasource_cb (GObject             *object,
                            TrackerSparqlCursor *cursor)
 {
   const gchar *type, *datasource, *datasource_name, *uri;
-  gboolean source_available;
+  gboolean source_available = FALSE;
   GError *error = NULL;
   GrlTrackerMedia *source;
 
@@ -278,7 +278,8 @@ tracker_get_datasource_cb (GObject             *object,
   datasource = tracker_sparql_cursor_get_string (cursor, 1, NULL);
   datasource_name = tracker_sparql_cursor_get_string (cursor, 2, NULL);
   uri = tracker_sparql_cursor_get_string (cursor, 3, NULL);
-  source_available = tracker_sparql_cursor_get_boolean (cursor, 4);
+  if (tracker_sparql_cursor_is_bound (cursor, 4))
+    source_available = tracker_sparql_cursor_get_boolean (cursor, 4);
 
   source = grl_tracker_media_find (datasource);
 



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