diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-08-03 21:43:08 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-08-03 21:43:08 +0800 |
commit | 6dd78a31ded543394f9375695f075ecaa15bfb70 (patch) | |
tree | ae11a453558ee2c4faf1678bb266d67a1b50cf1b /em-format/e-mail-formatter-quote.c | |
parent | 22098ef8f13f6706c3cbfb50e68de6bf70f47468 (diff) | |
download | gsoc2013-evolution-6dd78a31ded543394f9375695f075ecaa15bfb70.tar gsoc2013-evolution-6dd78a31ded543394f9375695f075ecaa15bfb70.tar.gz gsoc2013-evolution-6dd78a31ded543394f9375695f075ecaa15bfb70.tar.bz2 gsoc2013-evolution-6dd78a31ded543394f9375695f075ecaa15bfb70.tar.lz gsoc2013-evolution-6dd78a31ded543394f9375695f075ecaa15bfb70.tar.xz 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.c')
-rw-r--r-- | em-format/e-mail-formatter-quote.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/em-format/e-mail-formatter-quote.c b/em-format/e-mail-formatter-quote.c index 8abb73130b..5245fee2ba 100644 --- a/em-format/e-mail-formatter-quote.c +++ b/em-format/e-mail-formatter-quote.c @@ -99,7 +99,7 @@ mail_formatter_quote_run (EMailFormatter *formatter, "<blockquote type=cite>\n", cancellable, NULL); } - for (iter = context->parts; iter; iter = iter->next) { + for (iter = context->parts; iter; iter = g_slist_next (iter)) { EMailPart *part = iter->data; if (!part) @@ -116,16 +116,23 @@ mail_formatter_quote_run (EMailFormatter *formatter, while (iter) { EMailPart *p = iter->data; if (!p) { - iter = iter->next; + iter = g_slist_next (iter); + if (!iter) { + break; + } continue; } if (g_strcmp0 (p->id, end) == 0) break; - iter = iter->next; + iter = g_slist_next (iter); + if (!iter) { + break; + } } g_free (end); + continue; } |