diff --git a/libnymea-core/integrations/pythonintegrationplugin.cpp b/libnymea-core/integrations/pythonintegrationplugin.cpp index 1a4ad02e..3bdedb41 100644 --- a/libnymea-core/integrations/pythonintegrationplugin.cpp +++ b/libnymea-core/integrations/pythonintegrationplugin.cpp @@ -415,8 +415,10 @@ bool PythonIntegrationPlugin::loadScript(const QString &scriptFile) m_mutex.unlock(); // And call the handler - if any + PyEval_RestoreThread(m_threadState); PyObject *pyParamTypeId = PyUnicode_FromString(paramTypeId.toString().toUtf8()); PyObject *pyValue = QVariantToPyObject(value); + PyEval_ReleaseThread(m_threadState); callPluginFunction("configValueChanged", pyParamTypeId, pyValue); Py_DECREF(pyParamTypeId); Py_DECREF(pyValue);