Fix segfault when CutterCore is destructed

This commit is contained in:
Florian Märkl 2019-02-17 21:47:42 +01:00
parent 2b8a0df4cc
commit f5fb9f364f

View File

@ -2,6 +2,7 @@
#include "PythonAPI.h"
#include "PythonManager.h"
#include "Cutter.h"
#include <marshal.h>
#include <QDebug>
@ -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();