]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_Tools.cpp
Salome HOME
Fix for the issue #18736 : EDF - crash when dumping (python) from a HDF file made...
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.cpp
index 413f52c4ce616edd2c2e4cb49f84f0621dde2737..8714aca6204a3e9ef71c1e3597c48f03498ca9df 100644 (file)
@@ -645,6 +645,7 @@ std::pair<std::string, bool> getDefaultName(const std::shared_ptr<ModelAPI_Resul
         // check the referred object is a Body
         // (for example, ExtrusionCut has a sketch as a first attribute which is concealing)
         bool isBody = aRefIt->second.size() > 1 || (aRefIt->second.size() == 1 &&
+                      aRefIt->second.front().get() &&
                       aRefIt->second.front()->groupName() == ModelAPI_ResultBody::group());
         if (isBody && (isMainArg || aFoundRef == aReferences.end() ||
             aData->isPrecedingAttribute(aRefIt->first, aFoundRef->first)))