Explorar o código

Merge pull request #596 from msmolens/pythonqt-cleanup-before-py_finalize

ctkAbstractPythonManager: Clean up PythonQt before finalizing the Python interpreter
Jean-Christophe Fillion-Robin %!s(int64=10) %!d(string=hai) anos
pai
achega
4a2a0ac4ac

+ 1 - 1
CMakeExternals/PythonQt.cmake

@@ -66,7 +66,7 @@ if(NOT DEFINED PYTHONQT_INSTALL_DIR)
     message(FATAL_ERROR "error: Python is required to build ${PROJECT_NAME}")
   endif()
 
-  set(revision_tag 503597ba3274f59cd68347f11926340ec4f33471)
+  set(revision_tag f9c7e6a8e7c9ca7953b7128e820a81c93ed2cc56)
   if(${proj}_REVISION_TAG)
     set(revision_tag ${${proj}_REVISION_TAG})
   endif()

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

@@ -86,11 +86,12 @@ ctkAbstractPythonManager::ctkAbstractPythonManager(QObject* _parent) : Superclas
 //-----------------------------------------------------------------------------
 ctkAbstractPythonManager::~ctkAbstractPythonManager()
 {
+  PythonQt::cleanup();
+
   if (Py_IsInitialized())
     {
     Py_Finalize();
     }
-  PythonQt::cleanup();
 }
 
 //-----------------------------------------------------------------------------