From ba91c71660a3989f80dc58803244f5fca47850e5 Mon Sep 17 00:00:00 2001 From: regrain Date: Wed, 19 Jan 2005 10:49:47 +0000 Subject: [PATCH] * Test/VTKTest*.cxx : bug fix. Now the viewer is used only when the -V option is set --- Testing/VTKTestRead.cxx | 7 ++++--- Testing/VTKTestReadSeq.cxx | 7 ++++--- Testing/VTKTestWrite.cxx | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Testing/VTKTestRead.cxx b/Testing/VTKTestRead.cxx index 4a6dc5d0..655c41d9 100644 --- a/Testing/VTKTestRead.cxx +++ b/Testing/VTKTestRead.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: VTKTestRead.cxx,v $ Language: C++ - Date: $Date: 2005/01/19 10:43:01 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/01/19 10:49:47 $ + 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 @@ -236,7 +236,8 @@ int VTKTestRead(int argc, char *argv[]) ret += VTKReadTest(t,viewer,filename,pngfile,show); } t->Delete(); - viewer->Delete(); + if(viewer) + viewer->Delete(); return ret; } diff --git a/Testing/VTKTestReadSeq.cxx b/Testing/VTKTestReadSeq.cxx index 7339eb8a..80846185 100644 --- a/Testing/VTKTestReadSeq.cxx +++ b/Testing/VTKTestReadSeq.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: VTKTestReadSeq.cxx,v $ Language: C++ - Date: $Date: 2005/01/19 10:43:01 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/01/19 10:49:47 $ + 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 @@ -238,7 +238,8 @@ int VTKTestReadSeq(int argc, char *argv[]) ret += VTKReadSeqTest(t,viewer,filename,pngfile,show); } t->Delete(); - viewer->Delete(); + if(viewer) + viewer->Delete(); return ret; } diff --git a/Testing/VTKTestWrite.cxx b/Testing/VTKTestWrite.cxx index e782dd72..c6aac0ee 100644 --- a/Testing/VTKTestWrite.cxx +++ b/Testing/VTKTestWrite.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: VTKTestWrite.cxx,v $ Language: C++ - Date: $Date: 2005/01/19 10:43:01 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/01/19 10:49:47 $ + 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 @@ -240,7 +240,8 @@ int VTKTestWrite(int argc, char *argv[]) ret += VTKWriteTest(t,viewer,filename,pngfile,show); } t->Delete(); - viewer->Delete(); + if(viewer) + viewer->Delete(); return ret; } -- 2.48.1