X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Group_i.cxx;h=2473b8c4ca641c732b49220f3df809d456180d70;hp=20eb9798a9a4e397bc4d87faf7d19c4701d70b0b;hb=91c92cb54310225231438b4d3bafeb0d1643a7c0;hpb=244cad68ddd78f94affceeba5cf58597e87ed267 diff --git a/src/SMESH_I/SMESH_Group_i.cxx b/src/SMESH_I/SMESH_Group_i.cxx index 20eb9798a..2473b8c4c 100644 --- a/src/SMESH_I/SMESH_Group_i.cxx +++ b/src/SMESH_I/SMESH_Group_i.cxx @@ -592,8 +592,12 @@ SMESH::long_array* SMESH_GroupBase_i::GetIDs() SMESH::array_of_ElementType* SMESH_GroupBase_i::GetTypes() { SMESH::array_of_ElementType_var types = new SMESH::array_of_ElementType; - types->length( 1 ); - types[0] = GetType(); + if ( SMESHDS_GroupBase* ds = GetGroupDS() ) + if ( !ds->IsEmpty() ) + { + types->length( 1 ); + types[0] = GetType(); + } return types._retn(); }