aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-folder-tree-model.c')
-rw-r--r--mail/em-folder-tree-model.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 6f409cfb05..fc29c5e761 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -214,12 +214,20 @@ sort_cb (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data
return -1;
path = gtk_tree_model_get_path (model, a);
- aname = gtk_tree_path_to_string (path);
- gtk_tree_path_free (path);
+ if (path) {
+ aname = gtk_tree_path_to_string (path);
+ gtk_tree_path_free (path);
+ } else {
+ aname = g_strdup("");
+ }
path = gtk_tree_model_get_path (model, b);
- bname = gtk_tree_path_to_string (path);
- gtk_tree_path_free (path);
+ if (path) {
+ bname = gtk_tree_path_to_string (path);
+ gtk_tree_path_free (path);
+ } else {
+ bname = g_strdup("");
+ }
ret = strcmp (aname, bname);
g_free (aname);