From a982cfb1b978e3c928a23ebf9fd0d61792c8c939 Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 13 Oct 2005 11:21:51 +0000 Subject: [PATCH] Safe deleting of the image data. --- src/VISU_I/VISU_GaussPoints_i.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 5684ace3..71750c40 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -651,11 +651,12 @@ VISU::GaussPoints_i bool convertAlphaTexture = system( command2.latin1() ) == 0; if( convertMainTexture && convertAlphaTexture ){ - vtkImageData* anImageData = + vtkImageData* anImageData = VISU_GaussPointsPL::MakeTexture( mainTextureVTI.latin1(), alphaTextureVTI.latin1()); myGaussPointsPL->SetImageData( anImageData ); - anImageData->Delete(); + if( anImageData ) + anImageData->Delete(); } } -- 2.39.2