Salome HOME
bos #24400 [CEA] Option in SALOME for not storing in med files the indices (number...
[modules/smesh.git] / src / MEDWrapper / MED_Structures.cxx
index 1b0cbd59ef66cc274b99c077a640a109d21bae4a..c04113bc43a3a4d7e3a16e80243b606d945cb532 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -141,7 +141,8 @@ namespace MED
   TElemInfo
   ::SetElemNum(TInt theId, TInt theVal)
   {
-    (*myElemNum)[theId] = theVal;
+    if ( IsElemNum() )
+      (*myElemNum)[theId] = theVal;
   }
 
   //---------------------------------------------------------------