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-07 09:38:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-07 09:47:17 +0300
commit11292edba6ec361cc7142c4e2d9af0289cd895bb (patch)
tree2ecee7643e19d3ae87157d4a4b6c07b2e397f170 /source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
parent1ef59d0eb535c3d526a1a1f72e257b5aa5b15fb3 (diff)
BMesh: remove BMEditMesh.ob pointer
Remove this pointer since it's linking Mesh data back to the object, where a single edit-mesh may have multiple object users, causing incorrect assumptions in the code. Resolves dangling pointer part of the T72667 crash, although there are other issues which still need to be fixed. In EDBM_op_finish and EDBM_update_generic, full Main lookups have been added which should be replaced with mesh argument or the update tagging moved elsewhere.
Diffstat (limited to 'source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index afb73a84afe..996d807480d 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -610,7 +610,7 @@ void update_lattice_edit_mode_pointers(const Depsgraph * /*depsgraph*/,
lt_cow->editlatt = lt_orig->editlatt;
}
-void update_mesh_edit_mode_pointers(const Depsgraph *depsgraph, const ID *id_orig, ID *id_cow)
+void update_mesh_edit_mode_pointers(const ID *id_orig, ID *id_cow)
{
/* For meshes we need to update edit_mesh to make it to point
* to the CoW version of object.
@@ -624,7 +624,6 @@ void update_mesh_edit_mode_pointers(const Depsgraph *depsgraph, const ID *id_ori
return;
}
mesh_cow->edit_mesh = (BMEditMesh *)MEM_dupallocN(mesh_orig->edit_mesh);
- mesh_cow->edit_mesh->ob = (Object *)depsgraph->get_cow_id(&mesh_orig->edit_mesh->ob->id);
mesh_cow->edit_mesh->mesh_eval_cage = NULL;
mesh_cow->edit_mesh->mesh_eval_final = NULL;
}
@@ -639,7 +638,7 @@ void update_edit_mode_pointers(const Depsgraph *depsgraph, const ID *id_orig, ID
update_armature_edit_mode_pointers(depsgraph, id_orig, id_cow);
break;
case ID_ME:
- update_mesh_edit_mode_pointers(depsgraph, id_orig, id_cow);
+ update_mesh_edit_mode_pointers(id_orig, id_cow);
break;
case ID_CU:
update_curve_edit_mode_pointers(depsgraph, id_orig, id_cow);