mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
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
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…
Reference in New Issue
Block a user