From 35168039c055b01b75dcefeb02e6f80dd9bfc6b3 Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 23 Sep 2014 15:31:52 +0400 Subject: [PATCH] Avoid crash on Length constraint with value equal to 0 --- src/SketchSolver/SketchSolver_Constraint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) -- 2.39.2