From: azv Date: Tue, 14 Apr 2015 11:45:46 +0000 (+0300) Subject: Fix crash on removing of the Perpendicular constraint X-Git-Tag: V_1.1.0~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3a735faa01e3201b52e7b5eb70fca06dbdd46d07;hp=--cc;p=modules%2Fshaper.git Fix crash on removing of the Perpendicular constraint --- 3a735faa01e3201b52e7b5eb70fca06dbdd46d07 diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index 9a4623428..d7049b111 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -259,7 +259,8 @@ bool SketchSolver_Group::updateFeature(std::shared_ptr the std::set::iterator aCIter = aConstraints.begin(); for (; aCIter != aConstraints.end(); aCIter++) { ConstraintConstraintMap::iterator aSolConIter = myConstraints.find(*aCIter); - if (aSolConIter == myConstraints.end()) + if (aSolConIter == myConstraints.end() || !aSolConIter->first->data() || + !aSolConIter->first->data()->isValid()) continue; myFeatureStorage->changeFeature(theFeature, aSolConIter->first); aSolConIter->second->addFeature(theFeature);