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>2020-01-08 14:20:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-08 14:35:26 +0300
commit07a959067d5a3c05fcbd65105525d6e139be5c5f (patch)
tree3ec5a8fa93681482ba8014dd6ab98d8a1e7198d4 /source/blender/draw/intern/draw_cache_extract_mesh.c
parent010c551257d5e54eb4ca58116b745ca21a09c379 (diff)
Fix T72667: Collection delete hierarchy in edit-mode crashes
Also resolves T72848, although updating multiple windows doesn't work, this matches 2.7x behavior.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract_mesh.c')
-rw-r--r--source/blender/draw/intern/draw_cache_extract_mesh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.c b/source/blender/draw/intern/draw_cache_extract_mesh.c
index cce1710423b..e43c45a953d 100644
--- a/source/blender/draw/intern/draw_cache_extract_mesh.c
+++ b/source/blender/draw/intern/draw_cache_extract_mesh.c
@@ -128,6 +128,7 @@ typedef struct MeshRenderData {
} MeshRenderData;
static MeshRenderData *mesh_render_data_create(Mesh *me,
+ const bool is_editmode,
const float obmat[4][4],
const bool do_final,
const bool do_uvedit,
@@ -145,7 +146,7 @@ static MeshRenderData *mesh_render_data_create(Mesh *me,
const bool is_auto_smooth = (me->flag & ME_AUTOSMOOTH) != 0;
const float split_angle = is_auto_smooth ? me->smoothresh : (float)M_PI;
- if (me->edit_mesh) {
+ if (is_editmode) {
BLI_assert(me->edit_mesh->mesh_eval_cage && me->edit_mesh->mesh_eval_final);
mr->bm = me->edit_mesh->bm;
mr->edit_bmesh = me->edit_mesh;
@@ -4378,6 +4379,7 @@ static void extract_task_create(TaskPool *task_pool,
void mesh_buffer_cache_create_requested(MeshBatchCache *cache,
MeshBufferCache mbc,
Mesh *me,
+ const bool is_editmode,
const float obmat[4][4],
const bool do_final,
const bool do_uvedit,
@@ -4439,7 +4441,7 @@ void mesh_buffer_cache_create_requested(MeshBatchCache *cache,
#endif
MeshRenderData *mr = mesh_render_data_create(
- me, obmat, do_final, do_uvedit, iter_flag, data_flag, cd_layer_used, ts);
+ me, is_editmode, obmat, do_final, do_uvedit, iter_flag, data_flag, cd_layer_used, ts);
mr->cache = cache; /* HACK */
mr->use_hide = use_hide;
mr->use_subsurf_fdots = use_subsurf_fdots;