diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-10 12:30:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-10 12:30:22 +0300 |
commit | 2b857baeca84261dd4cf044ae10e810877d692c2 (patch) | |
tree | 3397f9a5bc11b94ff18e3d8afddc803ec6f93087 /source/blender | |
parent | aeda6078c4b108bfc36215d461485ee9f4d54225 (diff) |
[#20958] API: crash on mesh.update() if I unlink and link meshes with the same name twice
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index ff301fd8f26..35cedbd2d53 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -29,6 +29,7 @@ #include "BKE_library.h" #include "BKE_packedFile.h" #include "BKE_fcurve.h" +#include "BKE_animsys.h" #include "RNA_access.h" diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d5a948eccf9..f61bf8590eb 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -169,6 +169,10 @@ static void rna_Scene_unlink_object(Scene *scene, bContext *C, ReportList *repor /* as long as ED_base_object_free_and_unlink calls free_libblock_us, we don't have to decrement ob->id.us */ ED_base_object_free_and_unlink(scene, base); + /* needed otherwise the depgraph will contain free'd objects which can crash, see [#20958] */ + DAG_scene_sort(scene); + DAG_ids_flush_update(0); + WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene); } |