From 9401f2e8d18fadbf870843c1a3275d3c80d766d5 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 29 Dec 2015 15:56:27 +0100 Subject: [PATCH] COsdSetup: kill instance of osd_menu_colors Suggested, by svenhoefer Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/14124c7dd6dcc7274560658842ac95912d42b06e Author: Thilo Graf Date: 2015-12-29 (Tue, 29 Dec 2015) --- src/gui/osd_setup.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index f60ac1869..94f878488 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -514,10 +514,11 @@ int COsdSetup::showOsdSetup() osd_menu->addIntroItems(LOCALE_MAINSETTINGS_OSD); //item menu colors - if (osd_menu_colors == NULL){ - osd_menu_colors = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_MENUCOLORS); - showOsdMenueColorSetup(osd_menu_colors); - } + if (osd_menu_colors) + delete osd_menu_colors; + osd_menu_colors = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_COLORS, width, MN_WIDGET_ID_OSDSETUP_MENUCOLORS); + showOsdMenueColorSetup(osd_menu_colors); + CMenuForwarder * mf = new CMenuForwarder(LOCALE_COLORMENU_MENUCOLORS, true, NULL, osd_menu_colors, NULL, CRCInput::RC_red); mf->setHint("", LOCALE_MENU_HINT_COLORS); osd_menu->addItem(mf);