From f3bcf3d7b3296dbf3509e8da12d0f400de4346e1 Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 19 May 2005 15:37:40 +0000 Subject: [PATCH] To avoid warnings --- Example/exOverlaysACR.cxx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Example/exOverlaysACR.cxx b/Example/exOverlaysACR.cxx index 9bd48c54..a9206b6c 100644 --- a/Example/exOverlaysACR.cxx +++ b/Example/exOverlaysACR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: exOverlaysACR.cxx,v $ Language: C++ - Date: $Date: 2005/04/20 11:22:28 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/05/19 15:37:40 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -193,11 +193,10 @@ int main(int argc, char *argv[]) uint16_t overlayLocation; std::ostringstream str; std::string strOverlayLocation; - gdcm::File *fileToBuild; - gdcm::FileHelper *fh; + gdcm::File *fileToBuild = 0; + gdcm::FileHelper *fh = 0; - - + while ( (strOvlBitPosition = f1->GetEntryValue(currentOvlGroup, 0x0102)) != gdcm::GDCM_UNFOUND ) { @@ -275,7 +274,7 @@ while ( (strOvlBitPosition = f1->GetEntryValue(currentOvlGroup, 0x0102)) std::cout << "Failed\n" << "File in unwrittable\n"; delete fh; - delete fileToBuild; + if (fileToBuid) delete fileToBuild; delete pixels; delete tabPixels; return 0; @@ -289,8 +288,8 @@ while ( (strOvlBitPosition = f1->GetEntryValue(currentOvlGroup, 0x0102)) } delete f1; - delete fh; - delete fileToBuild; + if (f1) delete fh; + if (fileToBuid) delete fileToBuild; delete pixels; delete tabPixels; return 0; -- 2.45.1