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.
This commit is contained in:
parent
3335f852a1
commit
4ca19c7153
Notes:
blender-bot
2023-02-14 08:35:51 +01:00
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #90493, ASAN: Trying to Undo a knife-project operation causes heap-use-after-free failure Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue