[nautilus] list-view: don't crash when expanding a directory
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] list-view: don't crash when expanding a directory
- Date: Sun, 4 Aug 2013 21:30:23 +0000 (UTC)
commit 6f32b42280654bee7fb8d23c6ea9e21fefb374cb
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Aug 4 23:29:10 2013 +0200
list-view: don't crash when expanding a directory
We need to check for file != NULL, which is true in the case we just
started expanding the directory.
src/nautilus-list-view.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index f81682b..ff3c698 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -1774,6 +1774,13 @@ location_cell_data_func (GtkTreeViewColumn *column,
NAUTILUS_LIST_MODEL_FILE_COLUMN, &file,
-1);
+ /* The file might be NULL if we just toggled an expander
+ * and we're still loading the subdirectory.
+ */
+ if (file == NULL) {
+ return;
+ }
+
if (show_trash_orig && nautilus_file_is_in_trash (file)) {
NautilusFile *orig_file;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]