[gnome-photos] tracker-change-event: Assert that resolved values are never changed



commit e4ec3bafc162839a837646b6192071e545ff10e5
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Jan 8 16:46:47 2018 +0100

    tracker-change-event: Assert that resolved values are never changed

 src/photos-tracker-change-event.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/photos-tracker-change-event.c b/src/photos-tracker-change-event.c
index 7966fba0..44e222d5 100644
--- a/src/photos-tracker-change-event.c
+++ b/src/photos-tracker-change-event.c
@@ -125,6 +125,9 @@ photos_tracker_change_event_set_resolved_values (PhotosTrackerChangeEvent *self,
                                                  const gchar *urn,
                                                  const gchar *predicate)
 {
+  g_return_if_fail (self->predicate == NULL);
+  g_return_if_fail (self->urn == NULL);
+
   self->urn = g_strdup (urn);
   self->predicate = g_strdup (predicate);
 


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