]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix to avoid crashes in unit tests
authorazv <azv@opencascade.com>
Tue, 16 May 2017 15:06:26 +0000 (18:06 +0300)
committerazv <azv@opencascade.com>
Tue, 16 May 2017 15:06:26 +0000 (18:06 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp

index e70ec733737bd116f37bcec2e15a2f5c43234498..1cefde0322bd7baa364db68ef39ccf3d1285f67b 100644 (file)
@@ -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<PlaneGCSSolver_EdgeWrapper>(theArc);