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.
This commit is contained in:
2012-02-12 11:21:35 +00:00
parent bbff6787bc
commit 6afa4da928

View File

@@ -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 :) */