Fix #135333: Node tools crash with empty mesh input

The implicit sharing info can actually be null when there is
no shared array data.
This commit is contained in:
Hans Goudey
2025-03-01 12:24:28 -05:00
parent 8fe63f0ad8
commit b8cebdc9fe

View File

@@ -184,6 +184,9 @@ class MeshState {
}
mesh.attributes().foreach_attribute([&](const bke::AttributeIter &iter) {
const bke::GAttributeReader attribute = iter.get();
if (attribute.varray.size() == 0) {
return;
}
this->freeze_shared_state(*attribute.sharing_info);
});
}