deps/obs-scripting: Set current_lua_script earlier to prevent a crash
This commit is contained in:
parent
c9224edbad
commit
3714424808
4
deps/obs-scripting/obs-scripting-lua.c
vendored
4
deps/obs-scripting/obs-scripting-lua.c
vendored
@ -103,6 +103,8 @@ static bool load_lua_script(struct obs_lua_script *data)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
current_lua_script = data;
|
||||
|
||||
add_lua_source_functions(script);
|
||||
add_hook_functions(script);
|
||||
#if UI_ENABLED
|
||||
@ -163,8 +165,6 @@ static bool load_lua_script(struct obs_lua_script *data)
|
||||
else
|
||||
data->save = LUA_REFNIL;
|
||||
|
||||
current_lua_script = data;
|
||||
|
||||
lua_getglobal(script, "script_defaults");
|
||||
if (lua_isfunction(script, -1)) {
|
||||
ls_push_libobs_obj(obs_data_t, data->base.settings, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user