Fix immediate crash if a new scene would be loaded through the Lua interface

This commit is contained in:
Alexander Bock
2016-07-14 00:27:36 -04:00
parent 94a46813fe
commit b9237cb787
+8 -2
View File
@@ -168,9 +168,15 @@ bool SceneGraph::loadFromFile(const std::string& sceneDescription) {
LERROR("Specified common folder '" << fullCommonFolder << "' did not exist");
else {
if (!commonFolder.empty()) {
FileSys.registerPathToken(_commonModuleToken, commonFolder);
FileSys.registerPathToken(
_commonModuleToken, commonFolder,
ghoul::filesystem::FileSystem::Override::Yes
);
size_t nKeys = moduleDictionary.size();
moduleDictionary.setValue(std::to_string(nKeys + 1), commonFolder);
moduleDictionary.setValue(
std::to_string(nKeys + 1),
commonFolder
);
}
}
}