[nautilus-actions] Only tries to setup folders when there is a current profile



commit 2fd715d6da228f7da84948a83dfe2a4fbe425f97
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Oct 26 20:58:36 2009 +0100

    Only tries to setup folders when there is a current profile

 ChangeLog                       |    3 +++
 src/nact/nact-ibackground-tab.c |   10 ++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d3eb5c9..75672fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-10-26 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/nact-ibackground-tab.c (setup_folders):
+	Only tries to setup folders when there is a current profile.
+
 	* src/nact/nact-iadvanced-tab.c (release_schemes_list):
 	Clear the list store on dialog dispose.
 
diff --git a/src/nact/nact-ibackground-tab.c b/src/nact/nact-ibackground-tab.c
index 1aeffd4..af67437 100644
--- a/src/nact/nact-ibackground-tab.c
+++ b/src/nact/nact-ibackground-tab.c
@@ -517,11 +517,13 @@ setup_folders( NactIBackgroundTab *instance )
 			TAB_UPDATABLE_PROP_EDITED_PROFILE, &edited,
 			NULL );
 
-	folders = na_object_profile_get_folders( edited );
-	for( is = folders ; is ; is = is->next ){
-		add_row( instance, listview, ( const gchar * ) is->data );
+	if( edited ){
+		folders = na_object_profile_get_folders( edited );
+		for( is = folders ; is ; is = is->next ){
+			add_row( instance, listview, ( const gchar * ) is->data );
+		}
+		na_utils_free_string_list( folders );
 	}
-	na_utils_free_string_list( folders );
 }
 
 static void



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