diff options
author | Carlos Soriano <csoriano@gnome.org> | 2015-01-26 17:53:11 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-01-26 17:56:22 +0100 |
commit | 2275cd62fa1f720b7982bb43ff46df5ede1d3d60 (patch) | |
tree | 4ef7137cb7b1b996bb217d2df6cc6ffdac482cba /libnautilus-private/nautilus-file-undo-operations.c | |
parent | 2957dcc40e4098389b8e0645b2b2c7b14550f486 (diff) | |
download | nautilus-2275cd62fa1f720b7982bb43ff46df5ede1d3d60.tar.gz |
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.
Diffstat (limited to 'libnautilus-private/nautilus-file-undo-operations.c')
-rw-r--r-- | libnautilus-private/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 717f6f873..82156363c 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 |