Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/smesh
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.cxx
index 8a4313de59b324bccd92a775f058d82c58e3fcad..8455f6b4681a3886ab21329db943221ea44f882f 100644 (file)
@@ -649,11 +649,12 @@ SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
   throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
+
+  const int prevNbMeshEnt = NbNodes() + NbElements();
+
   if ( _preMeshInfo )
     _preMeshInfo->ForgetOrLoad();
 
-  const int prevNbMeshEnt = _impl->NbNodes() + _impl->GetMeshDS()->NbElements();
-
   std::string error;
   SMESH_Hypothesis::Hypothesis_Status status = addHypothesis( aSubShape, anHyp, &error );
   anErrorText = error.c_str();