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:
Tamás Bálint Misius 2022-01-28 08:03:14 +01:00
parent 622161e563
commit 0fcad65d6f
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -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();