diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-10 07:37:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-08-10 07:44:36 +0300 |
commit | 4ca19c715314b4db12af8963750ab1a0e9fdbf1d (patch) | |
tree | f57d54b666281ca20efce1461f942236fd30bf21 /source | |
parent | 3335f852a12973d4cb462d1f73a5cd734a313494 (diff) |
Fix T90493: Undo a knife-project operation crashes
The crash occurred calling because mesh_get_eval_final in edit-mode
freed all derived mesh data without tagging the object for updating.
However meshes in edit-mode weren't meant to be used as knife-project
source-data, adding support for multi object edit-mode caused this.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife_project.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife_project.c b/source/blender/editors/mesh/editmesh_knife_project.c index 09b17acf56d..54c35c071d4 100644 --- a/source/blender/editors/mesh/editmesh_knife_project.c +++ b/source/blender/editors/mesh/editmesh_knife_project.c @@ -131,9 +131,11 @@ static int knifeproject_exec(bContext *C, wmOperator *op) LinkNode *polys = NULL; CTX_DATA_BEGIN (C, Object *, ob, selected_objects) { - if (ob != obedit) { - polys = knifeproject_poly_from_object(C, scene, ob, polys); + if (BKE_object_is_in_editmode(ob)) { + continue; } + BLI_assert(ob != obedit); + polys = knifeproject_poly_from_object(C, scene, ob, polys); } CTX_DATA_END; |