Skip to content
Snippets Groups Projects
Commit 984343b2 authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot
Browse files

Merge topic 'fix-vtkImageSlice-Render'


13429008 Fix vtkImageSlice Render when mapper doesn't have an input

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !6827
parents 71bffccf 13429008
No related branches found
No related tags found
2 merge requests!8471Branch for the v9.1.0.rc1 release,!6827Fix vtkImageSlice Render when mapper doesn't have an input
Pipeline #173823 canceled
## 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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment