Fix custom bhv crash
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled

This commit is contained in:
Agent X 2026-01-26 18:56:59 -05:00
parent d53338f2b8
commit b82ee2453e

View file

@ -987,6 +987,11 @@ static s32 bhv_cmd_call_native_ext(void) {
}
const char *funcStr = dynos_behavior_get_token(behavior, BHV_CMD_GET_U32(1));
if (!funcStr) {
LOG_LUA("Could not retrieve function name from behavior command. Do you have an unclosed behavior script?");
gCurBhvCommand += 2;
return BHV_PROC_CONTINUE;
}
gSmLuaConvertSuccess = true;
LuaFunction funcRef = smlua_get_function_mod_variable(modIndex, funcStr);