[gnome-photos/wip/rishi/view-model: 3/5] item-manager: Assert that we don't have nested collections



commit 7b8543c58f7bf8ff8702f8ac11089b5a016a8f98
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Aug 23 19:49:01 2016 +0200

    item-manager: Assert that we don't have nested collections

 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 f9282e1..4c44da2 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -697,6 +697,9 @@ photos_item_manager_activate_previous_collection (PhotosItemManager *self)
   g_signal_emit (self, signals[ACTIVE_COLLECTION_CHANGED], 0, self->active_collection);
 
   g_clear_object (&collection);
+
+  g_return_if_fail (self->active_collection == NULL);
+  g_return_if_fail (self->active_object == NULL);
 }
 
 


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