[evolution/webkit] GN-bug #649935 - Check folder validity before asking for its URI



commit 4bef2aee995ca7cd4cb96bcb28c9a1e7ff5c910f
Author: Milan Crha <mcrha redhat com>
Date:   Fri May 13 14:05:11 2011 +0200

    GN-bug #649935 - Check folder validity before asking for its URI

 modules/mail/e-mail-shell-view-private.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index da82b16..55357fa 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -215,12 +215,15 @@ mail_shell_view_folder_tree_selection_done_cb (EMailShellView *mail_shell_view,
 	 * a hidden implementation detail, and we want to explicitly get
 	 * the folder URI from the message list here. */
 	folder = MESSAGE_LIST (message_list)->folder;
-	list_uri = e_mail_folder_uri_from_folder (folder);
+	if (folder)
+		list_uri = e_mail_folder_uri_from_folder (folder);
+	else
+		list_uri = NULL;
 	tree_uri = em_folder_tree_get_selected_uri (folder_tree);
 
 	/* If the folder tree and message list disagree on the current
 	 * folder, reset the folder tree to match the message list. */
-	if (g_strcmp0 (tree_uri, list_uri) != 0)
+	if (list_uri && g_strcmp0 (tree_uri, list_uri) != 0)
 		em_folder_tree_set_selected (folder_tree, list_uri, FALSE);
 
 	g_free (list_uri);



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