[nautilus] view-icon-controller: stop trying to reveal nothing
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] view-icon-controller: stop trying to reveal nothing
- Date: Fri, 31 Mar 2017 09:51:03 +0000 (UTC)
commit 9078c2cec129f6d95e444f3cbf69ab84e6627f46
Author: Ernestas Kulik <ernestask gnome org>
Date: Thu Mar 30 20:58:40 2017 +0300
view-icon-controller: stop trying to reveal nothing
Currently, the flow view tries to reveal the selection even if it is
empty. That can result in a crash if the selection is empty.
https://bugzilla.gnome.org/show_bug.cgi?id=780732
src/nautilus-view-icon-controller.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index c925352..b082368 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -399,6 +399,11 @@ real_reveal_selection (NautilusFilesView *files_view)
GtkAdjustment *vadjustment;
selection = nautilus_view_get_selection (NAUTILUS_VIEW (files_view));
+ if (selection == NULL)
+ {
+ return;
+ }
+
item_model = nautilus_view_model_get_item_from_file (self->model,
NAUTILUS_FILE (selection->data));
item_ui = nautilus_view_item_model_get_item_ui (item_model);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]