diff options
author | Corey Berla <corey@berla.me> | 2022-12-01 14:41:08 -0800 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2023-01-10 02:01:27 +0000 |
commit | 50a0788ed8caa0fa5823194fc9da5596bbfff4c6 (patch) | |
tree | fbb5afb524eed07cd711ae2f9a7d8eff4afe01a2 | |
parent | c8bf14004e17c683e34515274965ce4c872aeeb7 (diff) | |
download | nautilus-50a0788ed8caa0fa5823194fc9da5596bbfff4c6.tar.gz |
list-view: Don't leak NautilusViewItem
-rw-r--r-- | src/nautilus-list-view.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c index 87ed0af20..ca8c16061 100644 --- a/src/nautilus-list-view.c +++ b/src/nautilus-list-view.c @@ -938,7 +938,7 @@ static void on_subdirectory_done_loading (NautilusDirectory *directory, GtkTreeListRow *row) { - NautilusViewItem *item; + g_autoptr (NautilusViewItem) item = NULL; g_signal_handlers_disconnect_by_func (directory, on_subdirectory_done_loading, row); @@ -953,7 +953,7 @@ on_row_expanded_changed (GObject *gobject, { GtkTreeListRow *row = GTK_TREE_LIST_ROW (gobject); NautilusListView *self = NAUTILUS_LIST_VIEW (user_data); - NautilusViewItem *item; + g_autoptr (NautilusViewItem) item = NULL; g_autoptr (NautilusDirectory) directory = NULL; gboolean expanded; @@ -975,6 +975,7 @@ on_row_expanded_changed (GObject *gobject, if (!nautilus_directory_are_all_files_seen (directory)) { nautilus_view_item_set_loading (item, TRUE); + g_signal_connect_object (directory, "done-loading", G_CALLBACK (on_subdirectory_done_loading), |