From: azv Date: Tue, 16 May 2017 15:06:26 +0000 (+0300) Subject: Fix to avoid crashes in unit tests X-Git-Tag: V_2.7.1~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=251b260942a581f85b20e2ebe88787ac07334915;p=modules%2Fshaper.git Fix to avoid crashes in unit tests --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index e70ec7337..1cefde032 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -284,7 +284,7 @@ void PlaneGCSSolver_Storage::makeNonExternal(const EntityWrapperPtr& theEntity) void PlaneGCSSolver_Storage::createArcConstraints(const EntityWrapperPtr& theArc) { - if (theArc->type() != ENTITY_ARC || theArc->isExternal()) + if (!theArc || theArc->type() != ENTITY_ARC || theArc->isExternal()) return; EdgeWrapperPtr anEdge = std::dynamic_pointer_cast(theArc);