]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-index-message.cc
notmuch-index-message: Avoid crashing when a message has no references.
[notmuch] / notmuch-index-message.cc
index 51c9f049d99190c7c1240ed450f9f92f91091bf1..a0faf442dbf9ef1c04910046e3560c90df50f7a8 100644 (file)
@@ -215,6 +215,9 @@ add_terms_references (Xapian::Document doc,
 
     refs = g_mime_object_get_header (GMIME_OBJECT (message), "references");
 
+    if (refs == NULL)
+       return;
+
     while (*refs) {
        while (*refs && isspace (*refs))
            refs++;