]> git.notmuchmail.org Git - notmuch/commitdiff
add_message: Fix crash for file recognized as not email.
authorCarl Worth <cworth@cworth.org>
Mon, 9 Nov 2009 21:43:59 +0000 (13:43 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 9 Nov 2009 21:43:59 +0000 (13:43 -0800)
This crash was introduced sometime recently, as previously things
worked fine when notmuch detected that a file is not an email.
We're definitely overdue for that test suite.

database.cc

index 97043e99b7230ab6ccf4d5f587333278522aeba3..4524016b37aecb1d0ffbacfbe72d4b5c8b03b94d 100644 (file)
@@ -860,7 +860,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
                              notmuch_message_t **message_ret)
 {
     notmuch_message_file_t *message_file;
                              notmuch_message_t **message_ret)
 {
     notmuch_message_file_t *message_file;
-    notmuch_message_t *message;
+    notmuch_message_t *message = NULL;
     notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
     notmuch_private_status_t private_status;
 
     notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
     notmuch_private_status_t private_status;