diff options
| author | Carl Worth <cworth@cworth.org> | 2009-10-13 21:13:23 -0700 |
|---|---|---|
| committer | Carl Worth <cworth@cworth.org> | 2009-10-13 21:15:12 -0700 |
| commit | c0da89a8e02190f172e6f53073827bbdf91d60eb (patch) | |
| tree | fc7c68e8ca85774d6ddf0826cac82ca8a8384eb6 | |
| parent | 3922bb4cfda9d7e778a6cbf2bc8dee8ce2f9e140 (diff) | |
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.
| -rw-r--r-- | notmuch-index-message.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/notmuch-index-message.cc b/notmuch-index-message.cc index 51c9f049..a0faf442 100644 --- a/notmuch-index-message.cc +++ b/notmuch-index-message.cc @@ -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++; |
