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



commit ad99010249af6fe4e7d034120c05d4caa02c9971
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 ec2b98727..1b3931a46 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -1143,6 +1143,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]