Skip to content

Commit

Permalink
Merge pull request linuxmint#1418 from JosephMcc/desktop-fix
Browse files Browse the repository at this point in the history
Fix a crash when attempting to delete an empty selection on the desktop
  • Loading branch information
mtwebster authored Feb 16, 2017
2 parents 66ff168 + 32e5fc8 commit 74a8768
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libnemo-private/nemo-file-operations.c
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,8 @@ nemo_file_operations_trash_or_delete (GList *files,
NemoDeleteCallback done_callback,
gpointer done_callback_data)
{
g_return_if_fail (files != NULL);

trash_or_delete_internal (files, parent_window,
TRUE,
done_callback, done_callback_data);
Expand Down
5 changes: 5 additions & 0 deletions src/nemo-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,11 @@ trash_or_delete_selected_files (NemoView *view)
*/
if (!view->details->selection_was_removed) {
selection = nemo_view_get_selection_for_file_transfer (view);

if (selection == NULL) {
return;
}

trash_or_delete_files (nemo_view_get_containing_window (view),
selection, TRUE,
view);
Expand Down

0 comments on commit 74a8768

Please sign in to comment.