From: malaterre Date: Wed, 9 Feb 2005 22:11:09 +0000 (+0000) Subject: BUG: Remove seg fault from the nightly test. X-Git-Tag: Version1.0.bp~45 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=afb4925bd3110d67669db7264f78a238d4fb9333;p=gdcm.git BUG: Remove seg fault from the nightly test. --- diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 705aa7bf..f0fbb0cd 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmFile.cxx,v $ Language: C++ - Date: $Date: 2005/02/07 15:07:42 $ - Version: $Revision: 1.217 $ + Date: $Date: 2005/02/09 22:11:09 $ + Version: $Revision: 1.218 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -1177,6 +1177,11 @@ void File::AnonymizeNoLoad() || dynamic_cast(d) ) continue; + if( d == NULL) + { + gdcmWarningMacro( "I have no idea why this is NULL but this solve the seg fault"); + continue; + } offset = d->GetOffset(); lgth = d->GetLength(); fp->seekp( offset, std::ios::beg );