Commit 0e10d39c authored by Bill Lorensen's avatar Bill Lorensen
Browse files

ERR: was not checking for empty inputs.

parent e3ab9f8e
......@@ -20,7 +20,7 @@
#include "vtkImageData.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkImageCheckerboard, "1.9");
vtkCxxRevisionMacro(vtkImageCheckerboard, "1.10");
vtkStandardNewMacro(vtkImageCheckerboard);
//----------------------------------------------------------------------------
......@@ -174,6 +174,12 @@ void vtkImageCheckerboard::ThreadedExecute(vtkImageData **inData,
return;
}
in1Ptr = inData[0]->GetScalarPointerForExtent(outExt);
if (!in1Ptr)
{
vtkErrorMacro(<< "Input " << 0 << " cannot be empty.");
return;
}
outPtr = outData->GetScalarPointerForExtent(outExt);
// this filter expects that input is the same type as output.
......@@ -191,6 +197,11 @@ void vtkImageCheckerboard::ThreadedExecute(vtkImageData **inData,
return;
}
in2Ptr = inData[1]->GetScalarPointerForExtent(outExt);
if (!in2Ptr)
{
vtkErrorMacro(<< "Input " << 1 << " cannot be empty.");
return;
}
// this filter expects that inputs that have the same number of components
if (inData[0]->GetNumberOfScalarComponents() !=
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment