aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--em-format/em-format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 1285bcbf92..d3ab13b013 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -1632,7 +1632,7 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
link = g_queue_peek_head_link (emf->pending_uri_level->data);
- while (link->next != NULL) {
+ while (link && link->next != NULL) {
EMFormatPURI *puri = link->data;
if (puri->use_count == 0) {