diff options
author | Alexandru Pandelea <alexandru.pandelea@gmail.com> | 2016-09-07 22:15:56 +0300 |
---|---|---|
committer | Alexandru Pandelea <alexandru.pandelea@gmail.com> | 2016-09-08 21:55:41 +0300 |
commit | edf815992e2b30d688fa7e728f1fdb24f04f0ac5 (patch) | |
tree | bd8b56f9ebac2ea43338a10d4788977d4d76b741 /src/nautilus-file.c | |
parent | 0b6a05851d753c48197045079cc6e43237fc0b8b (diff) | |
download | nautilus-edf815992e2b30d688fa7e728f1fdb24f04f0ac5.tar.gz |
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
Diffstat (limited to 'src/nautilus-file.c')
-rw-r--r-- | 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 57e5377b7..541275875 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; } |