From: eap Date: Mon, 20 May 2013 10:26:26 +0000 (+0000) Subject: 0022211: [CEA 810] Error "NULL field support" when opening sauv files with MEDLoader X-Git-Tag: V6_7_0~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=922047cf4736e0916d6ecce9d3d3d2b1ad09633b;p=tools%2Fmedcoupling.git 0022211: [CEA 810] Error "NULL field support" when opening sauv files with MEDLoader Fix splitting a field into part-fields --- diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index 75e1d0c13..ef528cade 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -2102,8 +2102,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++ ); } } } @@ -2121,7 +2121,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() ) diff --git a/src/MEDLoader/SauvReader.cxx b/src/MEDLoader/SauvReader.cxx index 720d34b65..ebff8ecfd 100644 --- a/src/MEDLoader/SauvReader.cxx +++ b/src/MEDLoader/SauvReader.cxx @@ -808,7 +808,7 @@ void SauvReader::read_PILE_NODES_FIELD (const int nbObjects, fdouble->_group = getFieldSupport( supports ); else for ( i_sub = 0; i_sub < nb_sub; ++i_sub ) - fdouble->_sub[ i_sub ]._support->_isProfile; + fdouble->_sub[ i_sub ]._support->_isProfile = true; } // end loop on field objects