From 65eb81e87f05bcc45ef72701a77902131609e5e9 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 3 Dec 2014 10:28:00 +0300 Subject: [PATCH] Eliminated crash on creation of second sketch --- src/SketchSolver/SketchSolver_ConstraintManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.2