mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
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:
+5
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user