From: azv Date: Thu, 24 Dec 2015 05:36:37 +0000 (+0300) Subject: Fix crash in constraint creation. X-Git-Tag: V_2.1.0~90 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec07b77c45a4574e91587c02737af8eff150f2b3;p=modules%2Fshaper.git Fix crash in constraint creation. --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp index 9d7d63f2f..7d9911b91 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp @@ -185,10 +185,10 @@ std::list PlaneGCSSolver_Builder::createConstraint( ParameterWrapperPtr anIntermediate; std::shared_ptr aPoint1 = GCS_POINT_WRAPPER(thePoint1); - if (!aPoint1 && thePoint1->type() == ENTITY_POINT) + if (!aPoint1 && thePoint1 && thePoint1->type() == ENTITY_POINT) aPoint1 = GCS_POINT_WRAPPER( GCS_ENTITY_WRAPPER(thePoint1)->subEntities().front() ); std::shared_ptr aPoint2 = GCS_POINT_WRAPPER(thePoint2); - if (!aPoint2 && thePoint2->type() == ENTITY_POINT) + if (!aPoint2 && thePoint2 && thePoint2->type() == ENTITY_POINT) aPoint2 = GCS_POINT_WRAPPER( GCS_ENTITY_WRAPPER(thePoint2)->subEntities().front() ); switch (theType) {