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:
authorCampbell Barton <ideasman42@gmail.com>2021-09-02 08:39:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-09-02 09:12:24 +0300
commita8739ae6c2acbf0737113fbebf7e5ac0a942aaee (patch)
tree8ffccedde5a807780d0d3e988953aa75ceffa43d /source/blender/blenkernel/BKE_editmesh.h
parenta2f3aca6470b9a7f211ff95c5f3efeb7f62cb9f4 (diff)
Fix regression in recent change 0708733c46cb6b50697c1b80a6541d6fb410267e
Adding a mirror modifier in edit-mode crashed. Freeing meshes that hold a shallow copy happens in multiple places while calculating modifiers, making it impractical to clear the edit-mode pointer before freeing the mesh (as done in BKE_editmesh_free_derived_caches). Add a struct member to the edit-mesh struct so evaluated copies don't free the edit-mesh contents.
Diffstat (limited to 'source/blender/blenkernel/BKE_editmesh.h')
-rw-r--r--source/blender/blenkernel/BKE_editmesh.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h
index ffd8ac42c63..2c24b1a5487 100644
--- a/source/blender/blenkernel/BKE_editmesh.h
+++ b/source/blender/blenkernel/BKE_editmesh.h
@@ -79,6 +79,11 @@ typedef struct BMEditMesh {
int mirror_cdlayer;
/**
+ * Enable for evaluated copies, causes the edit-mesh to free the memory, not it's contents.
+ */
+ char is_shallow_copy;
+
+ /**
* ID data is older than edit-mode data.
* Set #Main.is_memfile_undo_flush_needed when enabling.
*/