diff --git a/src/common/PythonManager.cpp b/src/common/PythonManager.cpp index 0e3ca38c..b188154b 100644 --- a/src/common/PythonManager.cpp +++ b/src/common/PythonManager.cpp @@ -2,6 +2,7 @@ #include "PythonAPI.h" #include "PythonManager.h" +#include "Cutter.h" #include #include @@ -83,6 +84,9 @@ void PythonManager::shutdown() { emit willShutDown(); + // This is necessary to prevent a segfault when the CutterCore instance is deleted after the Shiboken::BindingManager + Core()->setProperty("_PySideInvalidatePtr", QVariant()); + restoreThread(); Py_Finalize();