[nautilus] nautilus-file: Fix segfault on batch rename for file gone
- From: Alexandru-Ionut Pandelea <alexpandelea src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] nautilus-file: Fix segfault on batch rename for file gone
- Date: Thu, 8 Sep 2016 18:56:02 +0000 (UTC)
commit edf815992e2b30d688fa7e728f1fdb24f04f0ac5
Author: Alexandru Pandelea <alexandru pandelea gmail com>
Date: Wed Sep 7 22:15:56 2016 +0300
nautilus-file: Fix segfault on batch rename for file gone
If one or more files are deleted during a batch rename and click rename,
Nautilus would seg fault.
The problem is that in the function nautilus_file_rename_handle_file_gone
there was called a callback that was NULL. For batch renaming, there is no
need for a callback here.
https://bugzilla.gnome.org/show_bug.cgi?id=770968
src/nautilus-file.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 57e5377..5412758 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -2374,7 +2374,8 @@ nautilus_file_rename_handle_file_gone (NautilusFile *file,
nautilus_file_changed (file);
error = g_error_new (G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
_("File not found"));
- (*callback)(file, NULL, error, callback_data);
+ if (callback)
+ (*callback)(file, NULL, error, callback_data);
g_error_free (error);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]