mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-07 12:58:33 -06:00
Remove a crash where ScriptManager was deinitialized wrongly
This commit is contained in:
@@ -208,7 +208,6 @@ bool OpenSpaceEngine::create(int argc, char** argv,
|
||||
}
|
||||
|
||||
void OpenSpaceEngine::destroy() {
|
||||
|
||||
delete _engine;
|
||||
ghoul::systemcapabilities::SystemCapabilities::deinitialize();
|
||||
FactoryManager::deinitialize();
|
||||
|
||||
@@ -209,8 +209,10 @@ bool ScriptEngine::initialize() {
|
||||
}
|
||||
|
||||
void ScriptEngine::deinitialize() {
|
||||
lua_close(_state);
|
||||
_state = nullptr;
|
||||
if (_state) {
|
||||
lua_close(_state);
|
||||
_state = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptEngine::addLibrary(LuaLibrary library) {
|
||||
|
||||
Reference in New Issue
Block a user