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:
jp9000 2018-02-01 20:01:46 -08:00
parent a2ae16e98c
commit c7c5bb999a

View File

@ -1023,6 +1023,7 @@ static void lua_tick(void *param, float seconds)
data = first_tick_script;
while (data) {
lua_State *script = data->script;
current_lua_script = data;
pthread_mutex_lock(&data->mutex);
@ -1033,6 +1034,7 @@ static void lua_tick(void *param, float seconds)
data = data->next_tick;
}
current_lua_script = NULL;
pthread_mutex_unlock(&tick_mutex);
/* --------------------------------- */