mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
gui/vfd_setup.cpp: fix memleaks when using CMenuForwarder
This commit is contained in:
@@ -114,17 +114,16 @@ int CVfdSetup::showSetup()
|
|||||||
vfds->addIntroItems(LOCALE_LCDMENU_HEAD);
|
vfds->addIntroItems(LOCALE_LCDMENU_HEAD);
|
||||||
|
|
||||||
//vfd brightness menu
|
//vfd brightness menu
|
||||||
CMenuWidget* lcd_sliders = new CMenuWidget(LOCALE_LCDMENU_HEAD, NEUTRINO_ICON_LCD,width, MN_WIDGET_ID_VFDSETUP_LCD_SLIDERS);
|
CMenuWidget lcd_sliders(LOCALE_LCDMENU_HEAD, NEUTRINO_ICON_LCD,width, MN_WIDGET_ID_VFDSETUP_LCD_SLIDERS);
|
||||||
showBrightnessSetup(lcd_sliders);
|
showBrightnessSetup(&lcd_sliders);
|
||||||
vfds->addItem(new CMenuForwarder(LOCALE_LCDMENU_LCDCONTROLER, vfd_enabled, NULL, lcd_sliders, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
|
vfds->addItem(new CMenuForwarder(LOCALE_LCDMENU_LCDCONTROLER, vfd_enabled, NULL, &lcd_sliders, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
|
||||||
|
|
||||||
//led menu
|
//led menu
|
||||||
CMenuWidget * ledMenu = NULL;
|
|
||||||
if(cs_get_revision() > 7)
|
if(cs_get_revision() > 7)
|
||||||
{
|
{
|
||||||
ledMenu = new CMenuWidget(LOCALE_LCDMENU_HEAD, NEUTRINO_ICON_LCD, width, MN_WIDGET_ID_VFDSETUP_LED_SETUP);
|
CMenuWidget * ledMenu = new CMenuWidget(LOCALE_LCDMENU_HEAD, NEUTRINO_ICON_LCD, width, MN_WIDGET_ID_VFDSETUP_LED_SETUP);
|
||||||
showLedSetup(ledMenu);
|
showLedSetup(ledMenu);
|
||||||
vfds->addItem(new CMenuForwarder(LOCALE_LEDCONTROLER_MENU, true, NULL, ledMenu, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
vfds->addItem(new CMenuDForwarder(LOCALE_LEDCONTROLER_MENU, true, NULL, ledMenu, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||||
}
|
}
|
||||||
|
|
||||||
vfds->addItem(GenericMenuSeparatorLine);
|
vfds->addItem(GenericMenuSeparatorLine);
|
||||||
|
Reference in New Issue
Block a user