aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/providers/imap/camel-imap-folder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 2a99df8149..6d944747c9 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1216,11 +1216,13 @@ parse_fetch_response (CamelImapFolder *imap_folder, char *response)
}
body = imap_parse_nstring (&response, &body_len);
- if (!body) {
+ if (!response) {
g_free (part_spec);
break;
}
+ if (!body)
+ body = g_strdup ("");
g_datalist_set_data_full (&data, "BODY_PART_SPEC", part_spec, g_free);
g_datalist_set_data_full (&data, "BODY_PART_DATA", body, g_free);
g_datalist_set_data (&data, "BODY_PART_LEN", GINT_TO_POINTER (body_len));