From cd2f2f20618287b112416b3627c1a8d5c417666d Mon Sep 17 00:00:00 2001 From: = Date: Mon, 2 Oct 2023 11:08:20 +0200 Subject: [PATCH] [VTK] avoid med crash with wrong version of vtk files --- .../legacy/medCoreLegacy/database/medDatabaseReader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/layers/legacy/medCoreLegacy/database/medDatabaseReader.cpp b/src/layers/legacy/medCoreLegacy/database/medDatabaseReader.cpp index 3d2408a9a..c6c947d3e 100644 --- a/src/layers/legacy/medCoreLegacy/database/medDatabaseReader.cpp +++ b/src/layers/legacy/medCoreLegacy/database/medDatabaseReader.cpp @@ -224,7 +224,10 @@ medAbstractData *medDatabaseReader::readFile( const QStringList& filenames ) connect ( dataReader, SIGNAL ( progressed ( int ) ), this, SIGNAL ( progressed ( int ) ) ); if ( dataReader->canRead ( filenames ) ) { - dataReader->read ( filenames ); + if (dataReader->read(filenames) == false) + { + break; + } dataReader->enableDeferredDeletion ( false ); medData = dynamic_cast(dataReader->data());