[nautilus] Don't crash when checking for recent: in multi file properties



commit 5a3481b8c3c78b2ad04a605c2ebf142373f64de7
Author: William Jon McCann <jmccann redhat com>
Date:   Sun Jul 15 08:53:25 2012 -0400

    Don't crash when checking for recent: in multi file properties

 src/nautilus-properties-window.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 950e57e..eb7fbb8 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -2474,8 +2474,10 @@ location_show_original (NautilusPropertiesWindow *window)
 {
 	NautilusFile *file;
 
-	file = get_original_file (window);
-	return !nautilus_file_is_in_recent (file);
+	/* there is no way a recent item will be mixed with
+	   other items so just pick the first file to check */
+	file = NAUTILUS_FILE (g_list_nth_data (window->details->original_files, 0));
+	return (file != NULL && !nautilus_file_is_in_recent (file));
 }
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]