[gnome-photos] item-manager: Assert valid ID and URI in check_wait_for_changes



commit 0e0616cfe100a1eba3c8371b75fb8acef6ff934c
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 dd8e9d9..0d0796e 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -148,6 +148,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]