New upstream version 21.1.2+dfsg1

This commit is contained in:
Sebastian Ramacher 2018-05-29 21:13:02 +02:00
parent baafb6325b
commit 665f64a933
152 changed files with 3957 additions and 356 deletions

View file

@ -1595,6 +1595,8 @@ void obs_python_load(void)
extern void add_python_frontend_funcs(PyObject *module);
static bool python_loaded_at_all = false;
bool obs_scripting_load_python(const char *python_path)
{
if (python_loaded)
@ -1696,6 +1698,8 @@ out:
obs_python_unload();
}
python_loaded_at_all = success;
if (python_loaded)
obs_add_tick_callback(python_tick, NULL);
@ -1704,6 +1708,9 @@ out:
void obs_python_unload(void)
{
if (!python_loaded_at_all)
return;
if (python_loaded && Py_IsInitialized()) {
PyGILState_Ensure();
@ -1722,4 +1729,6 @@ void obs_python_unload(void)
pthread_mutex_destroy(&tick_mutex);
pthread_mutex_destroy(&timer_mutex);
dstr_free(&cur_py_log_chunk);
python_loaded_at_all = false;
}