From 1f99cb347bbb73663d624894fa831e3eae64adaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Mon, 23 Dec 2013 11:31:27 +0100 Subject: [PATCH] fix full system failure when using the fix constrain --- src/Mod/Assembly/App/Constraint.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Assembly/App/Constraint.cpp b/src/Mod/Assembly/App/Constraint.cpp index 5727e9900..a23c91af1 100644 --- a/src/Mod/Assembly/App/Constraint.cpp +++ b/src/Mod/Assembly/App/Constraint.cpp @@ -125,7 +125,7 @@ App::DocumentObjectExecReturn* Constraint::execute(void) boost::shared_ptr Constraint::initLink(App::PropertyLinkSub& link) { - //empty links are allows + //empty links are allowed if(!link.getValue()) return boost::shared_ptr(); @@ -138,7 +138,7 @@ boost::shared_ptr Constraint::initLink(App::PropertyLinkSub& link) { Assembly::ItemPart* part = static_cast(link.getValue()); if(!part) - return boost::shared_ptr(); + throw ConstraintPartException(); //get the relevant solver in which the part needs to be added part->ensureInitialisation(); @@ -169,6 +169,8 @@ void Constraint::init(Assembly::ItemAssembly* ass) part2->m_part->fix(true); else throw ConstraintPartException(); + + return; }; //all other constraints need poth parts