]> git.notmuchmail.org Git - notmuch/blobdiff - database.cc
Fix missing error check.
[notmuch] / database.cc
index 578dce4b70c2d1740bb57f5c34a6f4a7b0c10214..1c0410c2c176a24f4897a33a70f945129c617aa9 100644 (file)
@@ -502,6 +502,10 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
     unsigned int i;
 
     message = notmuch_message_file_open (filename);
+    if (message == NULL) {
+       ret = NOTMUCH_STATUS_FILE_ERROR;
+       goto DONE;
+    }
 
     notmuch_message_file_restrict_headers (message,
                                           "date",