diff --git a/src/Mod/Fem/App/FemConstraint.cpp b/src/Mod/Fem/App/FemConstraint.cpp index 4e77962533..18f72e87d2 100644 --- a/src/Mod/Fem/App/FemConstraint.cpp +++ b/src/Mod/Fem/App/FemConstraint.cpp @@ -432,6 +432,10 @@ Base::Vector3d Constraint::getBasePoint(const Base::Vector3d& base, const Base:: const Base::Vector3d Constraint::getDirection(const App::PropertyLinkSub &direction) { App::DocumentObject* obj = direction.getValue(); + if (!obj) { + return Base::Vector3d(0,0,0); + } + if (obj->getTypeId().isDerivedFrom(App::Line::getClassTypeId())) { Base::Vector3d vec(1.0, 0.0, 0.0); static_cast(obj)->Placement.getValue().multVec(vec, vec);