]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1711: Dump study/Load saved script - tuple index out of range
authordbv <dbv@opencascade.com>
Thu, 8 Sep 2016 07:16:55 +0000 (10:16 +0300)
committerdbv <dbv@opencascade.com>
Thu, 8 Sep 2016 07:17:11 +0000 (10:17 +0300)
Fixed crash on dump exec

src/Model/Model_SelectionNaming.cpp

index 567d4a867c3bf4282c0c155fa30b426f9342c887..75baa4744158a329ecfb5f695892eaf125104020 100644 (file)
@@ -410,6 +410,10 @@ size_t ParseName(const std::string& theSubShapeName,   std::list<std::string>& t
 const TopoDS_Shape findCommonShape(
   const TopAbs_ShapeEnum theType, const TopTools_ListOfShape& theList)
 {
+  if(theList.IsEmpty()) {
+    return TopoDS_Shape();
+  }
+
   TopoDS_Shape aShape;
   std::vector<TopTools_MapOfShape> aVec;
   TopTools_MapOfShape aMap1, aMap2, aMap3, aMap4;