From 5e9d4c9295de62974f2f364b45faedd405407acc Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 26 Aug 2005 12:05:28 +0000 Subject: [PATCH] Debug detected during MED->VTK traduction : -call to MED::addDriver suppressed in VtkMed constructor (as it has been done for other Med drivers) to avoid SEGV when ~MED is called after MED::addDriver(VTK). -dt, it are set --- src/MEDMEM/MEDMEM_VtkMedDriver.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/MEDMEM/MEDMEM_VtkMedDriver.cxx b/src/MEDMEM/MEDMEM_VtkMedDriver.cxx index 9d4d61348..76c0a410b 100644 --- a/src/MEDMEM/MEDMEM_VtkMedDriver.cxx +++ b/src/MEDMEM/MEDMEM_VtkMedDriver.cxx @@ -25,10 +25,7 @@ VTK_MED_DRIVER::VTK_MED_DRIVER(): GENDRIVER(), VTK_MED_DRIVER::VTK_MED_DRIVER(const string & fileName, MED * const ptrMed): GENDRIVER(fileName,MED_EN::MED_RDWR), _ptrMed(ptrMed) { - _ptrMed->addDriver(*this); // OU RECUPERER L'ID. - _vtkFile = new ofstream(); - // What about _id in Gendriver ? - // _driverType ??? + _vtkFile = new ofstream(); } VTK_MED_DRIVER::VTK_MED_DRIVER(const VTK_MED_DRIVER & driver): @@ -167,8 +164,8 @@ void VTK_MED_DRIVER::write() const { deque timeStep = _ptrMed->getFieldIteration(FieldNames[j]) ; deque::const_iterator currentTimeStep ; for ( currentTimeStep=timeStep.begin(); currentTimeStep!=timeStep.end(); currentTimeStep++) { - int dt ; - int it ; + int dt = (*currentTimeStep).dt; + int it = (*currentTimeStep).it; FIELD_ * myField = _ptrMed->getField(FieldNames[j],dt,it) ; if( MeshNames[i] == myField->getSupport()->getMesh()->getName() ) { // rigth in all case : better compare pointeur ? -- 2.39.2