From 12c49d05c655116529e8c08e7d4f6b40d186393a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 1 Oct 2018 10:31:24 +1000 Subject: Fix freed memory use w/ panel unregister --- source/blender/makesrna/intern/rna_ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_ui.c') diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 7d9f547ea0d..4af658da1aa 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -202,11 +202,11 @@ static void rna_Panel_unregister(Main *UNUSED(bmain), StructRNA *type) BLI_freelinkN(&pt->parent->children, link); } + WM_paneltype_remove(pt); + BLI_freelistN(&pt->children); BLI_freelinkN(&art->paneltypes, pt); - WM_paneltype_remove(pt); - /* update while blender is running */ WM_main_add_notifier(NC_WINDOW, NULL); } -- cgit v1.2.3