diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-12 15:21:35 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-12 15:21:35 +0400 |
commit | 6afa4da928d5d791b0741cfbf47304ea66ad6e34 (patch) | |
tree | be893e4fa90ffdeb46bb8ea7dfca5e148a907f66 /source/blender/editors | |
parent | bbff6787bc8f13c7393690b25aae761789673b03 (diff) |
Fix #30152: Several drag and drop of image on mesh crashes
Issue was caused by making and loading editMesh in drop_named_image_invoke,
which lead to freeing/changing pointers used by CustomData layers. Some of
this pointers might be used by DerivedMesh, so we need to update DerivedMesh
after loading EditMesh.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index b10fbaf69b7..09ae5e08d60 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -403,6 +403,10 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) free_editMesh(me->edit_mesh); MEM_freeN(me->edit_mesh); me->edit_mesh= NULL; + + /* load_editMesh free's pointers used by CustomData layers which might be used by DerivedMesh too, + * so signal to re-create DerivedMesh here (sergey) */ + DAG_id_tag_update(&me->id, 0); } /* dummie drop support; ensure view shows a result :) */ |