mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
CodeQL findings
This commit is contained in:
@@ -81,9 +81,11 @@ void PythonProgram::execute(const QByteArray& python_code)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if (PY_VERSION_HEX < 0x030C0000)
|
||||
PyThreadState_Swap(_tstate);
|
||||
#else
|
||||
PyThreadState* prev_thread_state = PyThreadState_Swap(_tstate);
|
||||
|
||||
#endif
|
||||
PyObject* main_module = PyImport_ImportModule("__main__");
|
||||
if (!main_module)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user