notmuch-index-message: Avoid crashing when a message has no references.

It's obviously an innocent-enough message, and the right thing is
so easy to do.
This commit is contained in:
Carl Worth 2009-10-13 21:13:23 -07:00
parent 3922bb4cfd
commit c0da89a8e0

View 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++;