[gnome-commander] Don't free the list of files to be deleted to early
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Don't free the list of files to be deleted to early
- Date: Sat, 8 Jan 2022 19:41:28 +0000 (UTC)
commit b7a1a84551a3b749416b3c92810f44c1051a8959
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sat Jan 8 19:35:24 2022 +0100
Don't free the list of files to be deleted to early
src/dialogs/gnome-cmd-delete-dialog.cc | 3 +++
src/gnome-cmd-file-list.cc | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/dialogs/gnome-cmd-delete-dialog.cc b/src/dialogs/gnome-cmd-delete-dialog.cc
index 04651dc2..868905d0 100644
--- a/src/dialogs/gnome-cmd-delete-dialog.cc
+++ b/src/dialogs/gnome-cmd-delete-dialog.cc
@@ -505,7 +505,10 @@ void gnome_cmd_delete_dialog_show (GList *files)
}
if (response != 1)
+ {
+ g_list_free (files);
return;
+ }
// eventually remove non-empty dirs from list
files = remove_items_from_list_to_be_deleted(files);
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 744799f2..26c751b8 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -2412,7 +2412,6 @@ void gnome_cmd_file_list_show_delete_dialog (GnomeCmdFileList *fl)
if (files)
{
gnome_cmd_delete_dialog_show (files);
- g_list_free (files);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]