aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-folder-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-folder-list.c')
-rw-r--r--shell/e-folder-list.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/shell/e-folder-list.c b/shell/e-folder-list.c
index 6b7ee32c93..fff4d6c4aa 100644
--- a/shell/e-folder-list.c
+++ b/shell/e-folder-list.c
@@ -490,10 +490,13 @@ e_folder_list_parse_xml (char *xml)
items = g_new (EFolderListItem, i + 1);
- for (node = root->xmlChildrenNode, i = 0; node; node = node->next, i++) {
- items[i].uri = e_xml_get_string_prop_by_name_with_default (node, "uri", "");
- items[i].physical_uri = e_xml_get_string_prop_by_name_with_default (node, "physical-uri", "");
- items[i].display_name = e_xml_get_string_prop_by_name_with_default (node, "display-name", "");
+ for (node = root->xmlChildrenNode, i = 0; node; node = node->next) {
+ if (node->name && !strcmp (node->name, "folder")) {
+ items[i].uri = e_xml_get_string_prop_by_name_with_default (node, "uri", "");
+ items[i].physical_uri = e_xml_get_string_prop_by_name_with_default (node, "physical-uri", "");
+ items[i].display_name = e_xml_get_string_prop_by_name_with_default (node, "display-name", "");
+ i++;
+ }
}
items[i].uri = NULL;
items[i].physical_uri = NULL;