From fc34fc2f2ffd719c98b45e5af2c41300387a5702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Fri, 9 Sep 2016 11:46:11 +0200 Subject: [PATCH] Extensions: Fix crash due to wrong reference count --- src/App/ExtensionContainerPyImp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/ExtensionContainerPyImp.cpp b/src/App/ExtensionContainerPyImp.cpp index 233fec71f6..d218ae9af4 100644 --- a/src/App/ExtensionContainerPyImp.cpp +++ b/src/App/ExtensionContainerPyImp.cpp @@ -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(pp)->setValue(Py::asObject(proxy)); + static_cast(pp)->setPyObject(proxy); //make sure all functions of the extension are acessible through this object PyMethodDef* tmpptr = (PyMethodDef*)ext->getExtensionPyObject()->ob_type->tp_methods;