[nautilus] sidebar: don't try to add non-existing special dirs



commit 0f70ac4bb782b3c3fb0f5e8a24032cb344fdb2cc
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Aug 26 16:17:59 2010 +0200

    sidebar: don't try to add non-existing special dirs

 src/nautilus-places-sidebar.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 1abeba6..ce3ef5e 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -695,6 +695,11 @@ update_places (NautilusPlacesSidebar *sidebar)
 		}
 
 		path = g_get_user_special_dir (index);
+
+		if (!path) {
+			continue;
+		}
+
 		root = g_file_new_for_path (path);
 		name = g_file_get_basename (root);
 		icon = nautilus_user_special_directory_get_gicon (index);



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