fix crash with Py3 when releasing memory buffer
This commit is contained in:
@@ -210,6 +210,7 @@ Document::~Document()
|
||||
delete it2->second;
|
||||
|
||||
// remove the reference from the object
|
||||
Base::PyGILStateLocker lock;
|
||||
_pcDocPy->setInvalid();
|
||||
_pcDocPy->DecRef();
|
||||
delete d;
|
||||
|
||||
@@ -95,6 +95,7 @@ ViewProvider::ViewProvider()
|
||||
ViewProvider::~ViewProvider()
|
||||
{
|
||||
if (pyViewObject) {
|
||||
Base::PyGILStateLocker lock;
|
||||
pyViewObject->setInvalid();
|
||||
pyViewObject->DecRef();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user