From 9ad489fa8754642210dbe2c3fcab85847e9aed98 Mon Sep 17 00:00:00 2001 From: abd Date: Thu, 10 Aug 2006 06:08:40 +0000 Subject: [PATCH] Bug SWP12863 Protection for empty shrink data --- src/SVTK/SVTK_DeviceActor.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- 2.39.2