From 5925233e4d5ff3a4d5e86c1de103a2fb64da75ec Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 7 Aug 2025 12:38:27 -0400 Subject: [PATCH] Fix #143847: Assert in attribute operator poll after refactor Mistake in fa03c53d4a8ba16150232316a6ff8843ce02bb34. We need to test for negative indices here too. --- source/blender/blenkernel/intern/attribute.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc index 506bd89d73d..52f4a3c2e7d 100644 --- a/source/blender/blenkernel/intern/attribute.cc +++ b/source/blender/blenkernel/intern/attribute.cc @@ -812,7 +812,7 @@ std::optional BKE_attributes_active_name_get(AttributeOw } if (owner.type() != AttributeOwnerType::Mesh) { bke::AttributeStorage &storage = *owner.get_storage(); - if (active_index >= storage.count()) { + if (!IndexRange(storage.count()).contains(active_index)) { return std::nullopt; } return storage.at_index(active_index).name();