]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fixed the crash on edition of feature when the selected argument disappeared. Related...
authormpv <mpv@opencascade.com>
Fri, 27 Jan 2017 12:45:35 +0000 (15:45 +0300)
committermpv <mpv@opencascade.com>
Fri, 27 Jan 2017 12:45:35 +0000 (15:45 +0300)
src/Model/Model_AttributeSelection.cpp

index 39d1d45576add598a4012ff2761f9f365affde07..83c61b4e3591750ca813379054ffdc572f702e9d 100644 (file)
@@ -1008,6 +1008,9 @@ std::string Model_AttributeSelection::namingName(const std::string& theDefaultNa
   std::shared_ptr<GeomAPI_Shape> aSubSh = value();
   ResultPtr aCont = context();
 
+  if (!aCont.get()) // in case of selection of removed result
+    return "";
+
   Model_SelectionNaming aSelNaming(selectionLabel());
   return aSelNaming.namingName(
     aCont, aSubSh, theDefaultName, owner()->document() != aCont->document());