From c8fa5428bc63062e6d4754fb94acf0c02d082e0b Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 7 Feb 2005 11:53:05 +0000 Subject: [PATCH] Fix on [Bug PAL8053] REGRESSION: it is impossible to import ".../KERNEL/examples/champ1.med" file. --- src/CONVERTOR/VISU_MedConvertor.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 395bb92c..3eabe088 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -387,9 +387,17 @@ VISU_Convertor* VISU_MedConvertor::Build() { MED::TInt aNbComp = aFieldInfo->GetNbComp(); std::string aFieldName = aFieldInfo->GetName(); + MED::TErr anErr; MED::TGeom aTGeom; MED::EEntiteMaillage aMEntity; - MED::TInt aNbTimeStamps = aMed->GetNbTimeStamps(aFieldInfo,aEntityInfo,aMEntity,aTGeom); + MED::TInt aNbTimeStamps = aMed->GetNbTimeStamps(aFieldInfo, + aEntityInfo, + aMEntity, + aTGeom, + &anErr); + if(anErr < 0) + continue; + VISU::TEntity aVEntity = MEDEntityToVTK(aMEntity); VISU::PMeshOnEntity aMeshOnEntity = aMesh->myMeshOnEntityMap[aVEntity]; VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap; @@ -415,7 +423,6 @@ VISU_Convertor* VISU_MedConvertor::Build() { } for(MED::TInt iTimeStamp = 1; iTimeStamp <= aNbTimeStamps; iTimeStamp++){ - MED::TErr anErr; MED::PTimeStampInfo aTimeStamp = aMed->GetPTimeStampInfo(aFieldInfo, aMEntity, aTGeom, @@ -441,6 +448,7 @@ VISU_Convertor* VISU_MedConvertor::Build() { } }catch (std::exception& exc){ MSG(MYDEBUG,"Follow exception was occured :\n"<