diff options
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index a7c13ab2a81..95e408f593e 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -424,6 +424,8 @@ void BKE_object_free(Object *ob) { BKE_animdata_free((ID *)ob, false); + DRW_drawdata_free((ID *)ob); + /* BKE_<id>_free shall never touch to ID->us. Never ever. */ BKE_object_free_modifiers(ob, LIB_ID_CREATE_NO_USER_REFCOUNT); @@ -451,13 +453,6 @@ void BKE_object_free(Object *ob) sbFree(ob); - for (ObjectEngineData *oed = ob->drawdata.first; oed; oed = oed->next) { - if (oed->free != NULL) { - oed->free(oed); - } - } - BLI_freelistN(&ob->drawdata); - BKE_sculptsession_free(ob); BLI_freelistN(&ob->pc_ids); @@ -1210,7 +1205,7 @@ void BKE_object_copy_data(Main *UNUSED(bmain), Object *ob_dst, const Object *ob_ ob_dst->derivedFinal = NULL; BLI_listbase_clear(&ob_dst->gpulamp); - BLI_listbase_clear(&ob_dst->drawdata); + BLI_listbase_clear((ListBase *)&ob_dst->drawdata); BLI_listbase_clear(&ob_dst->pc_ids); ob_dst->avs = ob_src->avs; |