[Bf-blender-cvs] [738bc30] master: Fix T46738: Crash adding hook to linked mesh dupli

Campbell Barton noreply at git.blender.org
Tue Nov 10 10:33:25 CET 2015


Commit: 738bc300c7596b649a8974428b2569f2ca6483eb
Author: Campbell Barton
Date:   Tue Nov 10 20:25:05 2015 +1100
Branches: master
https://developer.blender.org/rB738bc300c7596b649a8974428b2569f2ca6483eb

Fix T46738: Crash adding hook to linked mesh dupli

===================================================================

M	source/blender/editors/mesh/editmesh_utils.c
M	source/blender/editors/object/object_hook.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index f102cf2..148398f 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -380,6 +380,10 @@ void EDBM_mesh_make(ToolSettings *ts, Object *ob)
 	EDBM_selectmode_flush(me->edit_btmesh);
 }
 
+/**
+ * \warning This can invalidate the #DerivedMesh cache of other objects (for linked duplicates).
+ * Most callers should run #DAG_id_tag_update on \a ob, see: T46738.
+ */
 void EDBM_mesh_load(Object *ob)
 {
 	Mesh *me = ob->data;
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 7b7f91b..03984b7 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -318,6 +318,8 @@ static bool object_hook_index_array(Scene *scene, Object *obedit,
 			EDBM_mesh_load(obedit);
 			EDBM_mesh_make(scene->toolsettings, obedit);
 
+			DAG_id_tag_update(&obedit->id, 0);
+
 			em = me->edit_btmesh;
 
 			EDBM_mesh_normals_update(em);




More information about the Bf-blender-cvs mailing list