diff options
author | Siddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in> | 2021-12-17 16:01:32 +0300 |
---|---|---|
committer | Siddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in> | 2021-12-17 16:01:32 +0300 |
commit | dbc41b30f88b96f7d8c6e995b17f5930eb55cc77 (patch) | |
tree | c6c495328443ea3621e5df2ef483b0e0dd504496 /source/blender/draw/intern/draw_view_data.cc | |
parent | 99a2af76d10e05a18987be5d554ada197b1ca086 (diff) | |
parent | 7c9e4099854a4fc8eab4db97173c1aacd25f9e08 (diff) |
Merge branch 'master' into soc-2021-uv-edge-select-supportsoc-2021-uv-edge-select-support
Diffstat (limited to 'source/blender/draw/intern/draw_view_data.cc')
-rw-r--r-- | source/blender/draw/intern/draw_view_data.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_view_data.cc b/source/blender/draw/intern/draw_view_data.cc index 55ebbf82c29..f7304737830 100644 --- a/source/blender/draw/intern/draw_view_data.cc +++ b/source/blender/draw/intern/draw_view_data.cc @@ -50,11 +50,6 @@ struct DRWViewData { Vector<ViewportEngineData *> enabled_engines; }; -/** - * Creates a view data with all possible engines type for this view. - * - * `engine_types` contains `DRWRegisteredDrawEngine`. - * */ DRWViewData *DRW_view_data_create(ListBase *engine_types) { DRWViewData *view_data = new DRWViewData(); @@ -120,6 +115,12 @@ static void draw_viewport_engines_data_clear(ViewportEngineData *data) MEM_SAFE_FREE(data->stl->storage[i]); } + if (data->instance_data) { + BLI_assert(engine_type->instance_free != nullptr); + engine_type->instance_free(data->instance_data); + data->instance_data = nullptr; + } + MEM_SAFE_FREE(data->fbl); MEM_SAFE_FREE(data->txl); MEM_SAFE_FREE(data->psl); |