CodeQL findings

This commit is contained in:
LordGrey
2024-12-01 16:21:39 +01:00
parent 5eb32f852b
commit 2d405baa8a
2 changed files with 4 additions and 20 deletions

View File

@@ -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)
{