Fixed a C string lifetime-related bug.

This commit is contained in:
Oliver Hamlet
2015-07-12 18:37:28 +01:00
parent ed2c78ab9d
commit 13a099e132
+3 -2
View File
@@ -55,8 +55,9 @@ namespace loot {
}
const char * gameLocalDataPath = nullptr;
if (!gameLocalAppData.empty())
gameLocalDataPath = gameLocalAppData.string().c_str();
string tempPathString = gameLocalAppData.string();
if (!tempPathString.empty())
gameLocalDataPath = tempPathString.c_str();
// If the handle has already been initialised, close it and open another.
if (_gh != nullptr) {