]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-index-message.cc
Avoid segfault on message with no subject.
[notmuch] / notmuch-index-message.cc
index 60370b62b99621f6d8ec1eea491d0b5b96c003ad..5c73825ba2f48e3d7964994d497e104c1a6464a0 100644 (file)
@@ -253,6 +253,9 @@ skip_re_in_subject (const char *subject)
 {
     const char *s = subject;
 
 {
     const char *s = subject;
 
+    if (subject == NULL)
+       return NULL;
+
     while (*s) {
        while (*s && isspace (*s))
            s++;
     while (*s) {
        while (*s && isspace (*s))
            s++;