From 20eaa1b1b033386a9b3098ad00c02cd3c5da047f Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 18 Jul 2025 16:21:13 +0200 Subject: [PATCH] Fix: Attributes: missing null check in when accessing attribute for write --- source/blender/blenkernel/intern/attribute_storage.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/blenkernel/intern/attribute_storage.cc b/source/blender/blenkernel/intern/attribute_storage.cc index 98818a760b5..c6d0ff4cbb4 100644 --- a/source/blender/blenkernel/intern/attribute_storage.cc +++ b/source/blender/blenkernel/intern/attribute_storage.cc @@ -165,6 +165,10 @@ AttrStorageType Attribute::storage_type() const Attribute::DataVariant &Attribute::data_for_write() { if (auto *data = std::get_if(&data_)) { + if (!data->sharing_info) { + BLI_assert(data->size == 0); + return data_; + } if (data->sharing_info->is_mutable()) { data->sharing_info->tag_ensured_mutable(); return data_;