From: Carl Worth Date: Mon, 9 Nov 2009 21:43:59 +0000 (-0800) Subject: add_message: Fix crash for file recognized as not email. X-Git-Tag: 0.1~555 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=39429339624f8d29db8f523d52a81c70001ebebe;hp=436b8a2fda3f0ba894cfd5f5332557cdff1663b0;p=notmuch add_message: Fix crash for file recognized as not email. 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. --- diff --git a/database.cc b/database.cc index 97043e99..4524016b 100644 --- a/database.cc +++ b/database.cc @@ -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; + notmuch_message_t *message = NULL; notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS; notmuch_private_status_t private_status;