X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_ElementFactory.cxx;h=12b0f80b00ef3d049fb6012d9a2c52a60b7edab2;hp=41018a0d9714e056992ab0b85ea631a936db3849;hb=8a0ae207320e1fcc7aa80e4b668f471ef887135b;hpb=734c82522e411c7771f5fe027bb326a95b50643d diff --git a/src/SMDS/SMDS_ElementFactory.cxx b/src/SMDS/SMDS_ElementFactory.cxx index 41018a0d9..12b0f80b0 100644 --- a/src/SMDS/SMDS_ElementFactory.cxx +++ b/src/SMDS/SMDS_ElementFactory.cxx @@ -239,6 +239,9 @@ int SMDS_ElementFactory::FromVtkToSmds( vtkIdType vtkID ) void SMDS_ElementFactory::Free( const SMDS_MeshElement* e ) { + if ( e != FindElement( e->GetID() )) + SALOME_Exception("SMDS_ElementFactory::Free(): element of other mesh"); + if ( !myVtkIDs.empty() ) { size_t id = e->GetID() - 1;