[nautilus] slot: fix a runtime warning
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] slot: fix a runtime warning
- Date: Mon, 4 Mar 2013 19:18:27 +0000 (UTC)
commit 91dfcc64b844158429e01ce92b495b627fb6b59b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 4 14:11:02 2013 -0500
slot: fix a runtime warning
At startup, slot->details->content_view is NULL, so we can't
unconditionally call nautilus_view_get_selection() on it.
src/nautilus-window-slot.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 2d0d1d8..bd3c220 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -695,6 +695,7 @@ nautilus_window_slot_open_location_full (NautilusWindowSlot *slot,
NautilusWindowSlot *target_slot;
NautilusWindowOpenFlags slot_flags;
GFile *old_location;
+ GList *old_selection;
char *old_uri, *new_uri;
int new_slot_position;
gboolean use_same;
@@ -793,7 +794,10 @@ nautilus_window_slot_open_location_full (NautilusWindowSlot *slot,
}
}
- GList *old_selection = nautilus_view_get_selection (slot->details->content_view);
+ old_selection = NULL;
+ if (slot->details->content_view != NULL) {
+ old_selection = nautilus_view_get_selection (slot->details->content_view);
+ }
if (target_window == window && target_slot == slot && !is_desktop &&
old_location && g_file_equal (old_location, location) &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]