Correctly load and pop scripts

This commit is contained in:
Alexander Bock
2016-07-08 10:49:18 +02:00
parent 5a41f7fa78
commit 3e20c6edd3

View File

@@ -654,13 +654,12 @@ void ScriptEngine::postSynchronizationPreDraw() {
while (!scripts.empty()) {
try {
const std::string& script = scripts.back();
scripts.pop_back();
runScript(script);
runScript(scripts.back());
}
catch (const ghoul::RuntimeError& e) {
LERRORC(e.component, e.message);
}
scripts.pop_back();
}
}