[Bf-blender-cvs] [7b5f09c0685] master: Fix memory leak of NLA child panel-types
Julian Eisel
noreply at git.blender.org
Tue Jan 28 18:48:12 CET 2020
Commit: 7b5f09c0685090bf7282f254e95647eed35da183
Author: Julian Eisel
Date: Tue Jan 28 18:43:41 2020 +0100
Branches: master
https://developer.blender.org/rB7b5f09c0685090bf7282f254e95647eed35da183
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.
===================================================================
M source/blender/editors/space_nla/nla_buttons.c
===================================================================
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");
More information about the Bf-blender-cvs
mailing list