]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Eliminated crash on creation of second sketch
authorazv <azv@opencascade.com>
Wed, 3 Dec 2014 07:28:00 +0000 (10:28 +0300)
committerazv <azv@opencascade.com>
Wed, 3 Dec 2014 07:28:00 +0000 (10:28 +0300)
src/SketchSolver/SketchSolver_ConstraintManager.cpp

index 24c6572c42d2893c500d9032cc371c66ffbd3913..3ba3fdda466add2db602fe914e8348843d1fa56f 100644 (file)
@@ -107,7 +107,7 @@ void SketchSolver_ConstraintManager::processEvent(
           std::dynamic_pointer_cast<SketchPlugin_Feature>(*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;
     }