Fix crash on exit if any modern particle callback is registered
All these smart pointers have to be cleared before the Lua state is closed. Ordinarily, we'd have a smart pointer to the Lua state defined earlier in LSI than these smart pointers, which would take care of destruction in the correct order, but tfw technical debt.
This commit is contained in:
parent
622161e563
commit
0fcad65d6f
@ -4382,6 +4382,10 @@ LuaScriptInterface::~LuaScriptInterface() {
|
||||
component_and_ref.second.Clear();
|
||||
component_and_ref.first->owner_ref = component_and_ref.second;
|
||||
}
|
||||
luaChangeTypeHandlers.clear();
|
||||
luaCreateAllowedHandlers.clear();
|
||||
luaCreateHandlers.clear();
|
||||
luaCtypeDrawHandlers.clear();
|
||||
lua_el_mode_v.clear();
|
||||
lua_el_func_v.clear();
|
||||
lua_gr_func_v.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user