Commit 984343b2 authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot

Merge topic 'fix-vtkImageSlice-Render'

13429008 Fix vtkImageSlice Render when mapper doesn't have an input
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !6827
parents 71bffccf 13429008
## Fix `vtkImageSlice` Render when mapper doesn't have an input
Fix `vtkImageSlice` Render which would SEGFAULT when input was empty.
......@@ -336,11 +336,14 @@ void vtkImageSlice::Render(vtkRenderer* ren)
// only call the mapper if it has an input
vtkImageData* input = this->Mapper->GetInput();
int* extent = input->GetExtent();
if (input && extent[0] <= extent[1] && extent[2] <= extent[3] && extent[4] <= extent[5])
if (input)
{
this->Mapper->Render(ren, this);
this->EstimatedRenderTime += this->Mapper->GetTimeToDraw();
int* extent = input->GetExtent();
if (extent[0] <= extent[1] && extent[2] <= extent[3] && extent[4] <= extent[5])
{
this->Mapper->Render(ren, this);
this->EstimatedRenderTime += this->Mapper->GetTimeToDraw();
}
}
vtkImageToImageMapper3DFriendship::SetCurrentRenderer(this->Mapper, nullptr);
......
Markdown is supported
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