diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-09-24 00:08:17 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-09-24 00:16:11 +0300 |
commit | c2a21dfb7714bf25431291f6598f43109af46446 (patch) | |
tree | 27691f5ead33a64dda91b4899f55f6ec90ec315f | |
parent | 7e980f2b8cb96aa6d04dc72899d08473367eeeb9 (diff) |
Sculpt: fix memory corruption in new attribute api
-rw-r--r-- | source/blender/blenkernel/intern/paint.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |