deps/obs-scripting: Fix crash removing callbacks in script_unload
Signed-off-by: Ilya Chernikov <chernikov.i123@gmail.com>
This commit is contained in:
parent
1aed7ed114
commit
a609cfb2f0
1 changed files with 3 additions and 0 deletions
3
deps/obs-scripting/obs-scripting-lua.c
vendored
3
deps/obs-scripting/obs-scripting-lua.c
vendored
|
|
@ -1228,10 +1228,13 @@ void obs_lua_script_unload(obs_script_t *s)
|
|||
/* call script_unload */
|
||||
|
||||
pthread_mutex_lock(&data->mutex);
|
||||
current_lua_script = data;
|
||||
|
||||
lua_getglobal(script, "script_unload");
|
||||
lua_pcall(script, 0, 0, 0);
|
||||
|
||||
current_lua_script = NULL;
|
||||
|
||||
/* ---------------------------- */
|
||||
/* remove all callbacks */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue