aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-quote-message-rfc822.c
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-08-03 21:43:08 +0800
committerDan Vrátil <dvratil@redhat.com>2012-08-03 21:43:08 +0800
commit6dd78a31ded543394f9375695f075ecaa15bfb70 (patch)
treeae11a453558ee2c4faf1678bb266d67a1b50cf1b /em-format/e-mail-formatter-quote-message-rfc822.c
parent22098ef8f13f6706c3cbfb50e68de6bf70f47468 (diff)
downloadgsoc2013-evolution-6dd78a31ded543394f9375695f075ecaa15bfb70.tar.gz
gsoc2013-evolution-6dd78a31ded543394f9375695f075ecaa15bfb70.tar.zst
gsoc2013-evolution-6dd78a31ded543394f9375695f075ecaa15bfb70.zip
Bug #680331 - Crash when replying to a message
Diffstat (limited to 'em-format/e-mail-formatter-quote-message-rfc822.c')
-rw-r--r--em-format/e-mail-formatter-quote-message-rfc822.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/em-format/e-mail-formatter-quote-message-rfc822.c b/em-format/e-mail-formatter-quote-message-rfc822.c
index fb5922c1af..531815d120 100644
--- a/em-format/e-mail-formatter-quote-message-rfc822.c
+++ b/em-format/e-mail-formatter-quote-message-rfc822.c
@@ -82,9 +82,12 @@ emfqe_message_rfc822_format (EMailFormatterExtension *extension,
g_free (header);
iter = e_mail_part_list_get_iter (context->parts, part->id);
+ if (!iter) {
+ return FALSE;
+ }
end = g_strconcat (part->id, ".end", NULL);
- for (iter = iter->next; iter; iter = iter->next) {
+ for (iter = g_slist_next (iter); iter; iter = g_slist_next (iter)) {
EMailPart * p = iter->data;
if (!p)
continue;
@@ -111,7 +114,10 @@ emfqe_message_rfc822_format (EMailFormatterExtension *extension,
while (iter) {
p = iter->data;
if (!p) {
- iter = iter->next;
+ iter = g_slist_next (iter);
+ if (!iter) {
+ break;
+ }
continue;
}
@@ -119,7 +125,10 @@ emfqe_message_rfc822_format (EMailFormatterExtension *extension,
break;
}
- iter = iter->next;
+ iter = g_slist_next (iter);
+ if (!iter) {
+ break;
+ }
}
g_free (sub_end);
continue;