fix crash with Py3 when releasing memory buffer

This commit is contained in:
wmayer
2018-10-29 11:59:34 +01:00
parent 42c5b2e9ca
commit 1e7aa1becf
2 changed files with 2 additions and 0 deletions

View File

@@ -95,6 +95,7 @@ ViewProvider::ViewProvider()
ViewProvider::~ViewProvider()
{
if (pyViewObject) {
Base::PyGILStateLocker lock;
pyViewObject->setInvalid();
pyViewObject->DecRef();
}