]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #18736 : EDF - crash when dumping (python) from a HDF file made...
authormpv <mpv@opencascade.com>
Thu, 20 Feb 2020 08:42:08 +0000 (11:42 +0300)
committermpv <mpv@opencascade.com>
Thu, 20 Feb 2020 08:42:08 +0000 (11:42 +0300)
Fixed crash if revolution is referenced to deleted objects

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)))