Salome HOME
IPAL52726: Hypotheses are missing from Object Browser after re-assignement
[modules/smesh.git] / src / SMESH / SMESH_Mesh.cxx
index 24042d9da45baf471bf2e72e06f5e63857786892..73030e901a943a47e4012b9870bc435b4411c03d 100644 (file)
@@ -2181,9 +2181,9 @@ SMESH_Group* SMESH_Mesh::ConvertToStandalone ( int theGroupID )
     return aGroup;
 
   SMESH_Group* anOldGrp = (*itg).second;
-  SMESHDS_GroupBase* anOldGrpDS = anOldGrp->GetGroupDS();
-  if ( !anOldGrp || !anOldGrpDS )
+  if ( !anOldGrp || !anOldGrp->GetGroupDS() )
     return aGroup;
+  SMESHDS_GroupBase* anOldGrpDS = anOldGrp->GetGroupDS();
 
   // create new standalone group
   aGroup = new SMESH_Group (theGroupID, this, anOldGrpDS->GetType(), anOldGrp->GetName() );