From: azv Date: Wed, 3 Dec 2014 07:28:00 +0000 (+0300) Subject: Eliminated crash on creation of second sketch X-Git-Tag: V_0.6.0^2~33^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=65eb81e87f05bcc45ef72701a77902131609e5e9;p=modules%2Fshaper.git Eliminated crash on creation of second sketch --- diff --git a/src/SketchSolver/SketchSolver_ConstraintManager.cpp b/src/SketchSolver/SketchSolver_ConstraintManager.cpp index 24c6572c4..3ba3fdda4 100644 --- a/src/SketchSolver/SketchSolver_ConstraintManager.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintManager.cpp @@ -107,7 +107,7 @@ void SketchSolver_ConstraintManager::processEvent( std::dynamic_pointer_cast(*aFeatIter); if (!aFeature) continue; - changeConstraintOrEntity(aFeature); + changeConstraintOrEntity(aFeature); } } @@ -169,7 +169,7 @@ bool SketchSolver_ConstraintManager::changeWorkplane( if (!isUpdated) { SketchSolver_ConstraintGroup* aNewGroup = new SketchSolver_ConstraintGroup(theSketch); // Verify that the group is created successfully - if (!aNewGroup->isBaseWorkplane(theSketch)) { + if (!aNewGroup->isBaseWorkplane(theSketch) || !aNewGroup->isWorkplaneValid()) { delete aNewGroup; return false; }