add solver.hpp
This commit is contained in:
committed by
Stefan Tröger
parent
36c474e8f4
commit
7a95658cdb
@@ -66,7 +66,7 @@ void ConstraintGroup::addConstraint(Constraint* c)
|
||||
|
||||
//let's retrieve the solver if not already done
|
||||
ItemAssembly* assembly = NULL;
|
||||
if(!m_solver) {
|
||||
if(!m_solver || !assembly) {
|
||||
|
||||
typedef std::vector<App::DocumentObject*>::iterator iter;
|
||||
std::vector<App::DocumentObject*> vec = getInList();
|
||||
@@ -86,6 +86,10 @@ void ConstraintGroup::addConstraint(Constraint* c)
|
||||
Base::Console().Message("ConstraintGroup: Unable to retrieve assembly solver\n");
|
||||
return;
|
||||
};
|
||||
if(!assembly) {
|
||||
Base::Console().Message("ConstraintGroup: Unable to retrieve assembly\n");
|
||||
return;
|
||||
};
|
||||
|
||||
//init the constraint
|
||||
c->init(m_solver);
|
||||
|
||||
Reference in New Issue
Block a user