Browse Source

Merge branch 'fix-ctkAbstractPythonManager-destructor'

* fix-ctkAbstractPythonManager-destructor:
  Use Py_IsInitialized() instead of PyEval_ThreadsInitialized()
Jean-Christophe Fillion-Robin 14 years ago
parent
commit
57bcbaca17
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Libs/Scripting/Python/Core/ctkAbstractPythonManager.cpp

+ 1 - 1
Libs/Scripting/Python/Core/ctkAbstractPythonManager.cpp

@@ -49,7 +49,7 @@ ctkAbstractPythonManager::ctkAbstractPythonManager(QObject* _parent) : Superclas
 //-----------------------------------------------------------------------------
 ctkAbstractPythonManager::~ctkAbstractPythonManager()
 {
-  if (PyEval_ThreadsInitialized())
+  if (Py_IsInitialized())
     {
     PyThreadState* state = PyThreadState_Get();
     Py_EndInterpreter(state);