[gnome-photos] tracker-change-event: Assert that different subjects can't be merged
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] tracker-change-event: Assert that different subjects can't be merged
- Date: Thu, 11 Jan 2018 09:58:45 +0000 (UTC)
commit 6946378a11f1447b409ce859b80162594b8484d8
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Jan 8 16:49:18 2018 +0100
tracker-change-event: Assert that different subjects can't be merged
src/photos-tracker-change-event.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/photos-tracker-change-event.c b/src/photos-tracker-change-event.c
index 44e222d5..c05e9847 100644
--- a/src/photos-tracker-change-event.c
+++ b/src/photos-tracker-change-event.c
@@ -115,6 +115,8 @@ photos_tracker_change_event_get_urn_id (PhotosTrackerChangeEvent *self)
void
photos_tracker_change_event_merge (PhotosTrackerChangeEvent *self, PhotosTrackerChangeEvent *event)
{
+ g_return_if_fail (g_strcmp0 (self->urn, event->urn) == 0);
+
if (event->type == PHOTOS_TRACKER_CHANGE_EVENT_DELETED || event->type ==
PHOTOS_TRACKER_CHANGE_EVENT_CREATED)
self->type = event->type;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]