[Bf-blender-cvs] [4ca19c71531] master: Fix T90493: Undo a knife-project operation crashes
Campbell Barton
noreply at git.blender.org
Tue Aug 10 06:45:11 CEST 2021
Commit: 4ca19c715314b4db12af8963750ab1a0e9fdbf1d
Author: Campbell Barton
Date: Tue Aug 10 14:37:39 2021 +1000
Branches: master
https://developer.blender.org/rB4ca19c715314b4db12af8963750ab1a0e9fdbf1d
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.
===================================================================
M source/blender/editors/mesh/editmesh_knife_project.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list