]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix crash on tangent arc in SolveSpaceSolver
authorazv <azv@opencascade.com>
Thu, 2 Jun 2016 12:20:33 +0000 (15:20 +0300)
committerazv <azv@opencascade.com>
Thu, 2 Jun 2016 12:20:33 +0000 (15:20 +0300)
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp

index e2c9f5d98d3fc07d057e29a9d2d21b5a3cca3012..805e458dd301fbbb755f47052317e27714872ff5 100644 (file)
@@ -78,8 +78,9 @@ bool SolveSpaceSolver_Storage::update(ConstraintWrapperPtr theConstraint)
     isUpdated = update(*anIt) || isUpdated;
     // do not update constrained entities for Multi constraints,
     // and for middle point constraint translated to equal lines
+    ConstraintPtr aBaseConstraint = theConstraint->baseConstraint();
     if (aSlvsConstr.type == SLVS_C_MULTI_ROTATION || aSlvsConstr.type == SLVS_C_MULTI_TRANSLATION ||
-       (theConstraint->baseConstraint()->getKind() == SketchPlugin_ConstraintMiddle::ID() &&
+       (aBaseConstraint && aBaseConstraint->getKind() == SketchPlugin_ConstraintMiddle::ID() &&
         aSlvsConstr.type != SLVS_C_AT_MIDPOINT))
       continue;