Sculpt: fix memory corruption in new attribute api

This commit is contained in:
Joseph Eagar
2022-09-23 14:08:17 -07:00
parent 7e980f2b8c
commit c2a21dfb77

View File

@@ -2640,7 +2640,10 @@ SculptAttribute *BKE_sculpt_attribute_get(struct Object *ob,
SculptAttribute *attr = sculpt_get_cached_layer(ss, domain, proptype, name);
if (attr) {
sculpt_attr_update(ob, attr);
if (sculpt_attr_update(ob, attr)) {
sculpt_attribute_update_refs(ob);
}
return attr;
}