[nautilus] application: protect against files withouth parent



commit 3309ea4c9b4a0d7dd324d366f3b50fe95685d579
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Aug 27 14:11:18 2015 +0200

    application: protect against files withouth parent

 src/nautilus-application.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 29bc259..1b4fae1 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -386,7 +386,8 @@ get_window_slot_for_location (NautilusApplication *application, GFile *location)
        slot = NULL;
         file = nautilus_file_get (location);
 
-       if (!nautilus_file_is_directory (file) && !nautilus_file_is_other_locations (file)) {
+        if (!nautilus_file_is_directory (file) && !nautilus_file_is_other_locations (file) &&
+            g_file_has_parent (location, NULL)) {
                location = g_file_get_parent (location);
        } else {
                g_object_ref (location);


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