[gnome-photos/wip/rishi/tracker-notifier: 5/5] item-manager: Assert that the TrackerNotifierEvent has a URN
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/tracker-notifier: 5/5] item-manager: Assert that the TrackerNotifierEvent has a URN
- Date: Thu, 4 Mar 2021 18:02:57 +0000 (UTC)
commit 715aa4729705892a34330a5a46999ab78f628f0f
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Mar 4 18:47:27 2021 +0100
item-manager: Assert that the TrackerNotifierEvent has a URN
The TrackerNotifierEvent is always expected to have a URN, even for
DELETE events. However, the URN might go missing due to a programmer
error. eg., not setting the Tracker domain in time.
https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/166
src/photos-item-manager.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 278efbb2..7958c463 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -544,6 +544,8 @@ photos_item_manager_notifier_events_foreach (gpointer data, gpointer user_data)
event_rdf_type,
event_urn);
+ g_return_if_fail (event_urn != NULL && event_urn[0] != '\0');
+
if (event_type == TRACKER_NOTIFIER_EVENT_UPDATE)
{
GObject *object;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]