Extensions: Fix crash due to wrong reference count

This commit is contained in:
Stefan Tröger
2016-09-09 11:46:11 +02:00
committed by wmayer
parent 07d749525f
commit fc34fc2f2f

View File

@@ -158,7 +158,7 @@ PyObject* ExtensionContainerPy::addExtension(PyObject *args) {
str << "Accessing the proxy property failed!" << std::ends;
throw Py::Exception(Base::BaseExceptionFreeCADError,str.str());
}
static_cast<PropertyPythonObject*>(pp)->setValue(Py::asObject(proxy));
static_cast<PropertyPythonObject*>(pp)->setPyObject(proxy);
//make sure all functions of the extension are acessible through this object
PyMethodDef* tmpptr = (PyMethodDef*)ext->getExtensionPyObject()->ob_type->tp_methods;