diff options
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 4125a35cb33..7401ef28f62 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -308,7 +308,16 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar) ar->v2d.tab_offset = NULL; } - BLI_freelistN(&ar->panels); + if (!BLI_listbase_is_empty(&ar->panels)) { + Panel *pa, *pa_next; + for (pa = ar->panels.first; pa; pa = pa_next) { + pa_next = pa->next; + if (pa->activedata) { + MEM_freeN(pa->activedata); + } + MEM_freeN(pa); + } + } for (uilst = ar->ui_lists.first; uilst; uilst = uilst->next) { if (uilst->dyn_data) { |