X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=cb313326270e6bc3b0ba5813a5491269e5a62ebb;hb=86cbd215eb67d7b996c977352a50e70c101cb641;hp=e08659e5d96a15b7564e280cc0716b3d83985516;hpb=62822a4e2dee695c486383f0fe3d90edafae24db;p=notmuch diff --git a/lib/message.cc b/lib/message.cc index e08659e5..cb313326 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -870,9 +870,9 @@ _notmuch_message_ensure_filename_list (notmuch_message_t *message) * * It would be nice to do the upgrade of the document directly * here, but the database is likely open in read-only mode. */ - const char *data; - data = message->doc.get_data ().c_str (); + std::string datastr = message->doc.get_data (); + const char *data = datastr.c_str (); if (data == NULL) INTERNAL_ERROR ("message with no filename");