[nautilus/wip/antoniof/new-list-view-continuation: 80/81] list-view: Check for NULL row in unbind_name_cell()




commit 73afd53838cd771063163da7c5e6136cfdb52e22
Author: Corey Berla <corey berla me>
Date:   Sun Jul 17 23:18:28 2022 -0700

    list-view: Check for NULL row in unbind_name_cell()
    
    If we unexpanded a row, then the item would no longer be available.
    Return early

 src/nautilus-list-view.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 760c43197..0dbb5a63e 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -1142,6 +1142,11 @@ unbind_name_cell (GtkSignalListItemFactory *factory,
     NautilusViewItem *item;
 
     item = listitem_get_view_item (listitem);
+    if (item == NULL)
+    {
+        /* The row is gone */
+        return;
+    }
     g_return_if_fail (NAUTILUS_IS_VIEW_ITEM (item));
 
     nautilus_view_item_set_item_ui (item, NULL);


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