From f5fb9f364ff47df7e32091f525554eb10c577ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sun, 17 Feb 2019 21:47:42 +0100 Subject: [PATCH] Fix segfault when CutterCore is destructed --- src/common/PythonManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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();