Salome HOME
0022211: [CEA 810] Error "NULL field support" when opening sauv files with MEDLoader
[tools/medcoupling.git] / src / MEDLoader / SauvMedConvertor.cxx
index f4af715ff6ed43e5489eacf2deee1c8ea832311f..c4b17862c1d5a79a622e0345f6544abec6fe159f 100644 (file)
@@ -2108,8 +2108,8 @@ void IntermediateMED::setFields( SauvUtilities::DoubleField* fld,
         }
       else
         {
-          fld->setValues( valPtr, iSub++ );
-          setTS( fld, values, medFields, mesh, iSub );
+          fld->setValues( valPtr, iSub );
+          setTS( fld, values, medFields, mesh, iSub++ );
         }
     }
 }
@@ -2127,7 +2127,7 @@ void IntermediateMED::setTS( SauvUtilities::DoubleField*  fld,
                              const int                    iSub)
 {
   // analyze a field support
-  const Group* support = fld->getSupport();
+  const Group* support = fld->getSupport( iSub );
   int dimRel;
   const bool onAll = isOnAll( support, dimRel );
   if ( !onAll && support->_name.empty() )