From: azv Date: Wed, 18 Sep 2019 10:07:45 +0000 (+0300) Subject: Add checking for empty pointer while dump to Python. X-Git-Tag: V9_4_0a2~4^2~83 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11e45272e1ca920eb2b979daeb5d42c24ed14a2e;p=modules%2Fshaper.git Add checking for empty pointer while dump to Python. --- diff --git a/src/ModelHighAPI/ModelHighAPI_Tools.cpp b/src/ModelHighAPI/ModelHighAPI_Tools.cpp index c61974d3b..8f1938720 100644 --- a/src/ModelHighAPI/ModelHighAPI_Tools.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Tools.cpp @@ -404,7 +404,7 @@ std::string storeFeatures(const std::string& theDocName, DocumentPtr theDoc, for(; allIter != allObjects.end(); allIter++) { ObjectPtr anObject = *allIter; FeaturePtr aFeature = std::dynamic_pointer_cast(anObject); - if (aFeature->getKind() == "SketchConstraintCoincidenceInternal") + if (aFeature && aFeature->getKind() == "SketchConstraintCoincidenceInternal") continue; // no need to dump and check internal constraints if (theCompare) {