diff options
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index dd23b61f148..c24a6d3c791 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -454,7 +454,15 @@ void BKE_object_free(Object *ob) } GPU_lamp_free(ob); - DRW_object_engine_data_free(ob); + for (ObjectEngineData *oed = ob->drawdata.first; oed; oed = oed->next) { + if (oed->storage) { + if (oed->free) { + oed->free(oed->storage); + } + MEM_freeN(oed->storage); + } + } + BLI_freelistN(&ob->drawdata); BKE_sculptsession_free(ob); |