From: abd Date: Thu, 10 Aug 2006 06:08:40 +0000 (+0000) Subject: Bug SWP12863 X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ad489fa8754642210dbe2c3fcab85847e9aed98;p=modules%2Fgui.git Bug SWP12863 Protection for empty shrink data --- diff --git a/src/SVTK/SVTK_DeviceActor.cxx b/src/SVTK/SVTK_DeviceActor.cxx index 279015efd..33d8f1246 100644 --- a/src/SVTK/SVTK_DeviceActor.cxx +++ b/src/SVTK/SVTK_DeviceActor.cxx @@ -249,8 +249,14 @@ SVTK_DeviceActor { if ( !myIsShrinkable ) return; + if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() ) - { + { + int numCells=aDataSet->GetNumberOfCells(); + int numPts = aDataSet->GetNumberOfPoints(); + //It's impossible to use to apply "shrink" for "empty" dataset + if (numCells < 1 || numPts < 1) + return; myShrinkFilter->SetInput( aDataSet ); myPassFilter[ 1 ]->SetInput( myShrinkFilter->GetOutput() ); myIsShrunk = true;