notmuch show: Avoid segmentation for message with no subject.
[notmuch] / lib / message-file.c
index 75caba6d8b055e5c3b57b2d72d1926381ff11fc8..8a3f8ee0fd2b66e04e0dd3e68b4abea37ae591f7 100644 (file)
@@ -238,7 +238,7 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
        return decoded_value;
 
     if (message->parsing_finished)
-       return NULL;
+       return "";
 
 #define NEXT_HEADER_LINE(closure)                              \
     while (1) {                                                        \
@@ -348,5 +348,5 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
                        header_desired);
     }
 
-    return NULL;
+    return "";
 }