From: eap Date: Wed, 16 Mar 2022 15:07:06 +0000 (+0300) Subject: bos #29332 [CEA 26899] GroupOnGeom returns None X-Git-Tag: V9_9_0a2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Ftags%2FV9_9_0a2;p=modules%2Fgeom.git bos #29332 [CEA 26899] GroupOnGeom returns None Make return an empty compound for an empty group where list == [-1] --- diff --git a/src/GEOMClient/GEOM_Client.cxx b/src/GEOMClient/GEOM_Client.cxx index 53f92b453..871cd861a 100644 --- a/src/GEOMClient/GEOM_Client.cxx +++ b/src/GEOMClient/GEOM_Client.cxx @@ -255,9 +255,10 @@ TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_p } /* Case of only one subshape, excluding groups of one main shape */ - if ( list->length() == 1 && !(aShape->GetType() == 37 && list[0] == 1) ) { - if (list[0] > 0) - S = subShapes[list[0]-1]; + if ( list->length() == 1 && + !(aShape->GetType() == 37 && list[0] == 1) && + list[0] > 0 ) { + S = subShapes[list[0]-1]; } else { BRep_Builder B;