]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Safe deleting of the image data.
authorouv <ouv@opencascade.com>
Thu, 13 Oct 2005 11:21:51 +0000 (11:21 +0000)
committerouv <ouv@opencascade.com>
Thu, 13 Oct 2005 11:21:51 +0000 (11:21 +0000)
src/VISU_I/VISU_GaussPoints_i.cc

index 5684ace39179048d151bcbebe035bae7242dc8b6..71750c40367a68796e137b0a349949bbe25ae7c1 100644 (file)
@@ -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();
   }
 }