Commit 54850bcd authored by Joachim Pouderoux's avatar Joachim Pouderoux Committed by Kitware Robot
Browse files

Merge topic 'fix-extractselection-emptyattribute'

d75da6bf

 Add a null guard to prevent crash on vtkExtractSelection
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !4657
parents 92058e87 d75da6bf
......@@ -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;
continue;
}
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