From: azv Date: Tue, 23 Sep 2014 11:31:52 +0000 (+0400) Subject: Avoid crash on Length constraint with value equal to 0 X-Git-Tag: V_0.4.4~28^2~7^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=35168039c055b01b75dcefeb02e6f80dd9bfc6b3;p=modules%2Fshaper.git Avoid crash on Length constraint with value equal to 0 --- diff --git a/src/SketchSolver/SketchSolver_Constraint.cpp b/src/SketchSolver/SketchSolver_Constraint.cpp index d5f1e6810..19af99788 100644 --- a/src/SketchSolver/SketchSolver_Constraint.cpp +++ b/src/SketchSolver/SketchSolver_Constraint.cpp @@ -190,7 +190,7 @@ AttrType typeOfAttribute(boost::shared_ptr theAttribute) if (anAttrRef->isObject()) { ResultConstructionPtr aRC = boost::dynamic_pointer_cast( anAttrRef->object()); - if (!aRC) + if (!aRC || !aRC->shape()) return UNKNOWN; if (aRC->shape()->isVertex())