Fix crashes if a non implemented lua function is called (notably reloadlanguage)
This commit is contained in:
parent
9ce9049131
commit
603bf9d117
@ -68,6 +68,7 @@ namespace OpenTaiko {
|
|||||||
|
|
||||||
protected object[] RunLuaCode(LuaFunction luaFunction, params object[] args) {
|
protected object[] RunLuaCode(LuaFunction luaFunction, params object[] args) {
|
||||||
try {
|
try {
|
||||||
|
if (luaFunction == null) return null;
|
||||||
var ret = luaFunction.Call(args);
|
var ret = luaFunction.Call(args);
|
||||||
LuaScript.State.GarbageCollector(KeraLua.LuaGC.Collect, 0);
|
LuaScript.State.GarbageCollector(KeraLua.LuaGC.Collect, 0);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user