deps/obs-scripting: Fix cur. script being NULL for script_tick
Fixes a bug where the thread local variable "current_lua_script" is not set when calling script_tick.
This commit is contained in:
parent
a2ae16e98c
commit
c7c5bb999a
2
deps/obs-scripting/obs-scripting-lua.c
vendored
2
deps/obs-scripting/obs-scripting-lua.c
vendored
@ -1023,6 +1023,7 @@ static void lua_tick(void *param, float seconds)
|
|||||||
data = first_tick_script;
|
data = first_tick_script;
|
||||||
while (data) {
|
while (data) {
|
||||||
lua_State *script = data->script;
|
lua_State *script = data->script;
|
||||||
|
current_lua_script = data;
|
||||||
|
|
||||||
pthread_mutex_lock(&data->mutex);
|
pthread_mutex_lock(&data->mutex);
|
||||||
|
|
||||||
@ -1033,6 +1034,7 @@ static void lua_tick(void *param, float seconds)
|
|||||||
|
|
||||||
data = data->next_tick;
|
data = data->next_tick;
|
||||||
}
|
}
|
||||||
|
current_lua_script = NULL;
|
||||||
pthread_mutex_unlock(&tick_mutex);
|
pthread_mutex_unlock(&tick_mutex);
|
||||||
|
|
||||||
/* --------------------------------- */
|
/* --------------------------------- */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user