From: dbv Date: Thu, 19 Jan 2017 12:04:41 +0000 (+0300) Subject: Issue #2005: Application crashes when loading python script for guitar X-Git-Tag: V_2.7.0~318 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6ab2c815b43166dc7cacb0366e05563ce2aef96d;p=modules%2Fshaper.git Issue #2005: Application crashes when loading python script for guitar Fixed crash. --- diff --git a/src/SketchAPI/SketchAPI_Projection.cpp b/src/SketchAPI/SketchAPI_Projection.cpp index d67149d02..584fa6751 100644 --- a/src/SketchAPI/SketchAPI_Projection.cpp +++ b/src/SketchAPI/SketchAPI_Projection.cpp @@ -71,8 +71,12 @@ std::shared_ptr SketchAPI_Projection::createdFeature() c { AttributeRefAttrPtr aProjectedRefAttr = projectedFeature(); FeaturePtr aProjectedFeature = ModelAPI_Feature::feature(aProjectedRefAttr->object()); - std::shared_ptr anEntity; + + if(!aProjectedFeature.get()) { + return anEntity; + } + aProjectedFeature->getKind() == SketchPlugin_Line::ID() ? anEntity.reset(new SketchAPI_Line(aProjectedFeature)) : aProjectedFeature->getKind() == SketchPlugin_Circle::ID() ?