From: Anthony Geay Date: Thu, 20 Nov 2014 16:40:18 +0000 (+0100) Subject: Correct bug when a umesh without any cells is written. X-Git-Tag: V7_5_1b1~5^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c7bf7fbf92e3677edc83d51fcc5e5e8aabb53b68;p=tools%2Fmedcoupling.git Correct bug when a umesh without any cells is written. --- diff --git a/src/MEDLoader/MEDFileMesh.cxx b/src/MEDLoader/MEDFileMesh.cxx index f07c99ce4..f9074f970 100644 --- a/src/MEDLoader/MEDFileMesh.cxx +++ b/src/MEDLoader/MEDFileMesh.cxx @@ -2314,7 +2314,9 @@ void MEDFileUMesh::writeLL(med_idt fid) const MEDLoaderBase::safeStrCpy(_name.c_str(),MED_NAME_SIZE,maa,_too_long_str); MEDLoaderBase::safeStrCpy(_desc_name.c_str(),MED_COMMENT_SIZE,desc,_too_long_str); int spaceDim=coo?coo->getNumberOfComponents():0; - int mdim=getMeshDimension(); + int mdim(0); + if(!_ms.empty()) + mdim=getMeshDimension(); INTERP_KERNEL::AutoPtr comp=MEDLoaderBase::buildEmptyString(spaceDim*MED_SNAME_SIZE); INTERP_KERNEL::AutoPtr unit=MEDLoaderBase::buildEmptyString(spaceDim*MED_SNAME_SIZE); for(int i=0;i