[Bf-blender-cvs] [c2a21dfb771] master: Sculpt: fix memory corruption in new attribute api
Joseph Eagar
noreply at git.blender.org
Fri Sep 23 23:16:21 CEST 2022
Commit: c2a21dfb7714bf25431291f6598f43109af46446
Author: Joseph Eagar
Date: Fri Sep 23 14:08:17 2022 -0700
Branches: master
https://developer.blender.org/rBc2a21dfb7714bf25431291f6598f43109af46446
Sculpt: fix memory corruption in new attribute api
===================================================================
M source/blender/blenkernel/intern/paint.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc
index 7475d2b5144..298ca8fff8c 100644
--- a/source/blender/blenkernel/intern/paint.cc
+++ b/source/blender/blenkernel/intern/paint.cc
@@ -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;
}
More information about the Bf-blender-cvs
mailing list