Skip to content
Snippets Groups Projects
Commit 13429008 authored by Thibault Pelletier's avatar Thibault Pelletier
Browse files

Fix vtkImageSlice Render when mapper doesn't have an input

* Fix SEGFAULT when vtkImageSlice doesn't have an input
parent 8f45e263
Branches
No related tags found
No related merge requests found
## 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.
Please register or to comment