|
@@ -49,8 +49,11 @@ ctkAbstractPythonManager::ctkAbstractPythonManager(QObject* _parent) : Superclas
|
|
//-----------------------------------------------------------------------------
|
|
//-----------------------------------------------------------------------------
|
|
ctkAbstractPythonManager::~ctkAbstractPythonManager()
|
|
ctkAbstractPythonManager::~ctkAbstractPythonManager()
|
|
{
|
|
{
|
|
- PyThreadState* state = PyThreadState_Get();
|
|
|
|
- Py_EndInterpreter(state);
|
|
|
|
|
|
+ if (PyEval_ThreadsInitialized())
|
|
|
|
+ {
|
|
|
|
+ PyThreadState* state = PyThreadState_Get();
|
|
|
|
+ Py_EndInterpreter(state);
|
|
|
|
+ }
|
|
PythonQt::cleanup();
|
|
PythonQt::cleanup();
|
|
}
|
|
}
|
|
|
|
|