Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2022-03-01 13:46:53 +0300
committerSergey Sharybin <sergey@blender.org>2022-03-01 13:46:53 +0300
commitf493e2f23a04da77b423dfe0699cae8368bc2062 (patch)
treeb302c81f81ff190b889d4d4563235749b5147580 /source/blender/blenkernel/intern/DerivedMesh.cc
parent90ec634135a0a79534fc34146c4860805279a3a9 (diff)
parent629f22f161abfbe492d71e08cc89651da683aded (diff)
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.cc')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc
index 79a3968b94f..39074a5c75f 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.cc
+++ b/source/blender/blenkernel/intern/DerivedMesh.cc
@@ -1513,7 +1513,9 @@ static void editbmesh_calc_modifiers(struct Depsgraph *depsgraph,
}
else {
Mesh *me_orig = mesh_input;
- if (me_orig->id.tag & LIB_TAG_COPIED_ON_WRITE) {
+ /* Modifying the input mesh is weak, however as there can only be one object in edit mode
+ * even if multiple are sharing the same mesh this should be thread safe. */
+ if ((me_orig->id.tag & LIB_TAG_COPIED_ON_WRITE) && (ob->mode & OB_MODE_EDIT)) {
if (!BKE_mesh_runtime_ensure_edit_data(me_orig)) {
BKE_mesh_runtime_reset_edit_data(me_orig);
}