From: dbv Date: Thu, 22 Sep 2016 08:48:18 +0000 (+0300) Subject: Issue #1766: Dump : crash SALOME when I load a script X-Git-Tag: V_2.5.1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9bd2dee79f0825fc56869d84bb91a686d9a92430;p=modules%2Fshaper.git Issue #1766: Dump : crash SALOME when I load a script Fix for crash when invalid name of face entered in Python API --- diff --git a/src/Model/Model_SelectionNaming.cpp b/src/Model/Model_SelectionNaming.cpp index 75baa4744..87c881c17 100644 --- a/src/Model/Model_SelectionNaming.cpp +++ b/src/Model/Model_SelectionNaming.cpp @@ -410,7 +410,7 @@ size_t ParseName(const std::string& theSubShapeName, std::list& t const TopoDS_Shape findCommonShape( const TopAbs_ShapeEnum theType, const TopTools_ListOfShape& theList) { - if(theList.IsEmpty()) { + if(theList.IsEmpty() || theList.Extent() == 1) { return TopoDS_Shape(); }