[nautilus] nautilus-file-undo-operations: Fix crash for multiple deleted files
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] nautilus-file-undo-operations: Fix crash for multiple deleted files
- Date: Mon, 26 Jan 2015 16:56:34 +0000 (UTC)
commit 2275cd62fa1f720b7982bb43ff46df5ede1d3d60
Author: Carlos Soriano <csoriano gnome org>
Date: Mon Jan 26 17:53:11 2015 +0100
nautilus-file-undo-operations: Fix crash for multiple deleted files
Previously when using GtkMenuItem, setting NULL to a label of a menu
item was not a problem, although it was a bug anyway since the
label was present as empty.
We were doing that with the Undo and Redo labels on the toolbar.
Now with GMenuItem it was crashing when deleting more than a file since
the label was NULL and the menu item couldn't be created.
To fix it, make sure we always set a label for the trash delete job.
.../nautilus-file-undo-operations.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-undo-operations.c
b/libnautilus-private/nautilus-file-undo-operations.c
index 717f6f8..8215636 100644
--- a/libnautilus-private/nautilus-file-undo-operations.c
+++ b/libnautilus-private/nautilus-file-undo-operations.c
@@ -1001,10 +1001,10 @@ trash_strings_func (NautilusFileUndoInfo *info,
*redo_description = g_strdup_printf (_("Move '%s' to trash"), name);
g_free (name);
-
- *undo_label = g_strdup (_("_Undo Trash"));
- *redo_label = g_strdup (_("_Redo Trash"));
}
+
+ *undo_label = g_strdup (_("_Undo Trash"));
+ *redo_label = g_strdup (_("_Redo Trash"));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]