aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-09-04 21:55:11 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-09-04 21:55:11 +0800
commit8cb1d72ab92609dd656c76a8b6267c6b4762a17f (patch)
tree0650fd6d8b08a4ec0b9b7977a66c1282e88f97f2 /mail
parent6cdedbe194cbea84d30ba58d5b637b309fa55d77 (diff)
downloadgsoc2013-evolution-8cb1d72ab92609dd656c76a8b6267c6b4762a17f.tar
gsoc2013-evolution-8cb1d72ab92609dd656c76a8b6267c6b4762a17f.tar.gz
gsoc2013-evolution-8cb1d72ab92609dd656c76a8b6267c6b4762a17f.tar.bz2
gsoc2013-evolution-8cb1d72ab92609dd656c76a8b6267c6b4762a17f.tar.lz
gsoc2013-evolution-8cb1d72ab92609dd656c76a8b6267c6b4762a17f.tar.xz
gsoc2013-evolution-8cb1d72ab92609dd656c76a8b6267c6b4762a17f.tar.zst
gsoc2013-evolution-8cb1d72ab92609dd656c76a8b6267c6b4762a17f.zip
em_folder_tree_model_get_folder_name: Don't return NULL.
If a folder's display name is not available in the folder tree model for some reason, return the raw folder path rather than NULL. This silences a runtime warning in the mail-notification plugin. This feels like a Band-Aid for a deeper issue -- perhaps we're racing the folder tree model? Might be better to just fetch the CamelFolder asynchronously and get the folder's display name directly.
Diffstat (limited to 'mail')
-rw-r--r--mail/em-folder-tree-model.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 9e6616dd1e..7eca514f54 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -1288,11 +1288,11 @@ em_folder_tree_model_get_folder_name (EMFolderTreeModel *model,
si = em_folder_tree_model_lookup_store_info (model, store);
if (si == NULL)
- return NULL;
+ return g_strdup (full);
reference = g_hash_table_lookup (si->full_hash, full);
if (!gtk_tree_row_reference_valid (reference))
- return NULL;
+ return g_strdup (full);
path = gtk_tree_row_reference_get_path (reference);
gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path);