From: ouv Date: Thu, 13 Oct 2005 11:21:51 +0000 (+0000) Subject: Safe deleting of the image data. X-Git-Tag: TG-D5-38-2003_D2005-20-12~172 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a982cfb1b978e3c928a23ebf9fd0d61792c8c939;p=modules%2Fvisu.git Safe deleting of the image data. --- 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(); } }