summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Lane <iain.lane@canonical.com>2014-06-30 11:00:00 +0100
committerMatthias Clasen <mclasen@redhat.com>2014-07-01 08:01:35 -0400
commit796f6c7123775d90089e586ef05eea4673b4f352 (patch)
tree9f2bce84616fd9892ccaac4395e4489e165010e7
parent24ee8d5e1708d8fc66d93a1f02f647529c64c4fd (diff)
downloadnautilus-796f6c7123775d90089e586ef05eea4673b4f352.tar.gz
Don't try to open a selection if we don't have one.
Fixes a crash when the user invokes the open item (ctrl+alt+o) shortcut with no selection. https://bugzilla.gnome.org/show_bug.cgi?id=732469
-rw-r--r--src/nautilus-view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 2f091ea3c..780884343 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -1137,6 +1137,9 @@ action_open_item_location_callback (GtkAction *action,
view = NAUTILUS_VIEW (callback_data);
selection = nautilus_view_get_selection (view);
+ if (!selection)
+ return;
+
item = NAUTILUS_FILE (selection->data);
activation_location = nautilus_file_get_activation_location (item);
activation_file = nautilus_file_get (activation_location);