[gnome-photos/wip/uajain/master-fixes] item-manager: Remove assertion while hiding
- From: Umang Jain <uajain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/uajain/master-fixes] item-manager: Remove assertion while hiding
- Date: Sat, 3 Sep 2016 00:24:54 +0000 (UTC)
commit e3a6abeb502d8c47f930086e1ffe003db49525db
Author: Umang Jain <mailumangjain gmail com>
Date: Sat Sep 3 05:10:34 2016 +0530
item-manager: Remove assertion while hiding
This assertion will definitely break because on "window-mode-changed" signal
as tracker-controller will clear the item-manager's mode-specific child and
repopulate it with it's cursor by calling item_manager_add_item_for_mode.
While clearing, the item is still present in other item_mngr_chldrn. The
photos_item_manager_clear will remove items from item_mngr_chldrn[0] and
the mode specific child_mngr itself. The other child mngrs (in which the
item may be still present with same id) are untouched. Therefore, the same
id will give two different pointers in the assertion and it will break.
src/photos-item-manager.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 09e089d..099549f 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -984,10 +984,7 @@ photos_item_manager_hide_item (PhotosItemManager *self, PhotosBaseItem *item)
item1 = PHOTOS_BASE_ITEM (photos_base_manager_get_object_by_id (self->item_mngr_chldrn[i], id));
if (item1 != NULL)
- {
- g_assert_true (item == item1);
- hidden_item->modes[i] = TRUE;
- }
+ hidden_item->modes[i] = TRUE;
}
g_hash_table_insert (self->hidden_items, g_strdup (id), hidden_item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]