deps/obs-scripting: Allow NULL script with script_log
(This commit also modifies the frontend-tools module) Prevents a potential crash when script_log is called by a thread spawned by a python library.
This commit is contained in:
parent
c87597f7d6
commit
a2ae16e98c
3 changed files with 24 additions and 10 deletions
6
deps/obs-scripting/obs-scripting-python.c
vendored
6
deps/obs-scripting/obs-scripting-python.c
vendored
|
|
@ -1193,7 +1193,11 @@ static PyObject *py_script_log_internal(PyObject *self, PyObject *args,
|
|||
|
||||
while (endl) {
|
||||
*endl = 0;
|
||||
script_log(&cur_python_script->base, log_level, "%s", start);
|
||||
if (cur_python_script)
|
||||
script_log(&cur_python_script->base, log_level, "%s",
|
||||
start);
|
||||
else
|
||||
script_log(NULL, log_level, "%s", start);
|
||||
*endl = '\n';
|
||||
|
||||
start = endl + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue