Commit d75da6bf authored by Joachim Pouderoux's avatar Joachim Pouderoux
Browse files

Add a null guard to prevent crash on vtkExtractSelection

parent 92058e87
......@@ -338,7 +338,13 @@ int vtkExtractSelection::RequestData(
selector->ComputeSelectedElements(input, output);
// Set up a map from selection node name to insidedness array.
auto array = output->GetAttributes(assoc)->GetArray(name.c_str());
auto *attributes = output->GetAttributes(assoc);
if (!attributes)
arrayMap[name] = nullptr;
auto array = attributes->GetArray(name.c_str());
auto insidednessArray = vtkSignedCharArray::SafeDownCast(array);
auto node = selection->GetNode(name.c_str());
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