[gnome-photos/wip/flickr: 8/14] tracker-change-monitor: Protect against invalid subject and predicate



commit 4a434a0eb621196e80353e0852d78ce9867bd8ed
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Jul 1 16:29:11 2013 +0200

    tracker-change-monitor: Protect against invalid subject and predicate
    
    The subject was sometimes coming out as an unbound value. I don't know
    why, but till then lets protect against it.

 src/photos-tracker-change-monitor.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-tracker-change-monitor.c b/src/photos-tracker-change-monitor.c
index 1b9240b..dd68dd2 100644
--- a/src/photos-tracker-change-monitor.c
+++ b/src/photos-tracker-change-monitor.c
@@ -159,7 +159,8 @@ photos_tracker_change_monitor_cursor_next (GObject *source_object, GAsyncResult
 
       subject = tracker_sparql_cursor_get_string (cursor, 0, NULL);
       predicate = tracker_sparql_cursor_get_string (cursor, 1, NULL);
-      photos_tracker_change_monitor_add_event (data->self, subject, predicate, data->is_delete);
+      if (subject != NULL && predicate != NULL)
+        photos_tracker_change_monitor_add_event (data->self, subject, predicate, data->is_delete);
     }
 
   photos_tracker_change_monitor_update_collector (data->self);


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