]> git.notmuchmail.org Git - notmuch/blobdiff - lib/message.cc
Merge branch 'release'
[notmuch] / lib / message.cc
index e08659e5d96a15b7564e280cc0716b3d83985516..cb313326270e6bc3b0ba5813a5491269e5a62ebb 100644 (file)
@@ -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. */
         *
         * 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");
 
        if (data == NULL)
            INTERNAL_ERROR ("message with no filename");