From 9bd2dee79f0825fc56869d84bb91a686d9a92430 Mon Sep 17 00:00:00 2001 From: dbv Date: Thu, 22 Sep 2016 11:48:18 +0300 Subject: [PATCH] Issue #1766: Dump : crash SALOME when I load a script Fix for crash when invalid name of face entered in Python API --- src/Model/Model_SelectionNaming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.39.2