[gnome-photos/gnome-3-22] item-manager: Assert valid ID and URI in check_wait_for_changes
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-22] item-manager: Assert valid ID and URI in check_wait_for_changes
- Date: Wed, 11 Jan 2017 13:24:54 +0000 (UTC)
commit a1d9f2aaeb22736c4f9e1e357911208c57a73863
Author: Kartikeya Sharma <09kartikeya gmail com>
Date: Tue Jan 10 22:46:49 2017 +0530
item-manager: Assert valid ID and URI in check_wait_for_changes
The URI can be NULL if we don't handle collections correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=776565
src/photos-item-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index a33ebe4..fa30fa1 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -145,6 +145,9 @@ photos_item_manager_check_wait_for_changes (PhotosItemManager *self, const gchar
GList *l;
GList *tasks;
+ g_return_if_fail (id != NULL && id[0] != '\0');
+ g_return_if_fail (uri != NULL && uri[0] != '\0');
+
tasks = (GList *) g_hash_table_lookup (self->wait_for_changes_table, uri);
for (l = tasks; l != NULL; l = l->next)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]