[nautilus/gnome-3-2] list-view: don't activate the previewer when there's no selection
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-2] list-view: don't activate the previewer when there's no selection
- Date: Mon, 17 Oct 2011 21:11:21 +0000 (UTC)
commit 5c815d36162e5efd321550b7b2364445a77ef1f6
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Sep 28 17:09:44 2011 -0400
list-view: don't activate the previewer when there's no selection
Or we'll segfault when trying to access the first item of the selection.
https://bugzilla.gnome.org/show_bug.cgi?id=654857
src/nautilus-list-view.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index cf30a93..a260f4b 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -240,9 +240,11 @@ preview_selected_items (NautilusListView *view)
file_list = nautilus_list_view_get_selection (NAUTILUS_VIEW (view));
- nautilus_view_preview_files (NAUTILUS_VIEW (view),
- file_list, NULL);
- nautilus_file_list_free (file_list);
+ if (file_list != NULL) {
+ nautilus_view_preview_files (NAUTILUS_VIEW (view),
+ file_list, NULL);
+ nautilus_file_list_free (file_list);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]