PBAP: fixed dangling reference

Binding a temporary std::string (the result of getDatabase() in this
case) to a const reference is broken, because the temporary instance
will get deleted before the reference.
This commit is contained in:
Patrick Ohly 2012-08-27 11:49:19 +02:00
parent e0cf4666e3
commit 03d11362e9

View file

@ -215,7 +215,7 @@ std::string PbapSyncSource::getMimeVersion() const
void PbapSyncSource::open()
{
const string &database = getDatabaseID();
string database = getDatabaseID();
const string prefix("obex-bt://");
if (!boost::starts_with(database, prefix)) {