From: azv Date: Tue, 12 Jul 2016 07:20:24 +0000 (+0300) Subject: Fix couple of crashes in SketchSolver plugin X-Git-Tag: V_2.5.0~205 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=afc0cb8741279cf6bb4d388b96a8add84af3186a;p=modules%2Fshaper.git Fix couple of crashes in SketchSolver plugin --- diff --git a/src/SketchSolver/SketchSolver_ConstraintMulti.cpp b/src/SketchSolver/SketchSolver_ConstraintMulti.cpp index 952fecafd..f89f31421 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMulti.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMulti.cpp @@ -43,7 +43,8 @@ void SketchSolver_ConstraintMulti::getEntities(std::list& theE if (!aFeature) continue; - myStorage->update(aFeature); + if (!myStorage->update(aFeature)) // the entity is not created, so it is a copy in "multi" constraint, force its creation + myStorage->update(aFeature, myGroupID, true); theEntities.push_back(myStorage->entity(aFeature)); myFeatures.insert(aFeature); for (int i = 0; i < myNumberOfCopies && anObjIt != anObjectList.end(); ++i, ++anObjIt) { diff --git a/src/SketchSolver/SketchSolver_Manager.cpp b/src/SketchSolver/SketchSolver_Manager.cpp index c83f544f2..4748424f8 100644 --- a/src/SketchSolver/SketchSolver_Manager.cpp +++ b/src/SketchSolver/SketchSolver_Manager.cpp @@ -526,7 +526,7 @@ static void collectPointsAndCopies(FeaturePtr theConstraint, std::listattribute(*anIt)); }