Salome HOME
Merge from V6_3_BR 15/07/2011
[modules/smesh.git] / src / SMESH_I / SMESH_Group_i.cxx
index 20eb9798a9a4e397bc4d87faf7d19c4701d70b0b..2473b8c4ca641c732b49220f3df809d456180d70 100644 (file)
@@ -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();
 }