[nautilus] Don't try to open a selection if we don't have one.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't try to open a selection if we don't have one.
- Date: Tue, 1 Jul 2014 12:03:07 +0000 (UTC)
commit 796f6c7123775d90089e586ef05eea4673b4f352
Author: Iain Lane <iain lane canonical com>
Date: Mon Jun 30 11:00:00 2014 +0100
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
src/nautilus-view.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 2f091ea..7808843 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]