diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2020-01-28 20:43:41 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2020-01-28 20:47:55 +0300 |
commit | 7b5f09c0685090bf7282f254e95647eed35da183 (patch) | |
tree | 519a25fdcf9fdaf5f5c39903d779445d026b4bcd /source/blender/editors/space_nla | |
parent | 14deacdc22875c87ce2005a21d99257a03da738f (diff) |
Fix memory leak of NLA child panel-types
Panel types always need to be registered in the region-panel-types list,
or they won't get free'd.
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_buttons.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 9af11a0bb00..3a9adb00437 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -636,8 +636,9 @@ void nla_buttons_register(ARegionType *art) pt->flag = PNL_DEFAULT_CLOSED; pt->poll = nla_strip_eval_panel_poll; BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt)); + BLI_addtail(&art->paneltypes, pt); - pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel evaluation"); + pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel animated strip time"); strcpy(pt->idname, "NLA_PT_animated_strip_time"); strcpy(pt->parent_id, "NLA_PT_properties"); strcpy(pt->label, N_("Animated Strip Time")); @@ -649,6 +650,7 @@ void nla_buttons_register(ARegionType *art) pt->flag = PNL_DEFAULT_CLOSED; pt->poll = nla_strip_eval_panel_poll; BLI_addtail(&pt_properties->children, BLI_genericNodeN(pt)); + BLI_addtail(&art->paneltypes, pt); pt = MEM_callocN(sizeof(PanelType), "spacetype nla panel modifiers"); strcpy(pt->idname, "NLA_PT_modifiers"); |