From cc4b0fdb56fb19d952391192b274b101583e4ff3 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 11 Apr 2018 16:21:14 +0200 Subject: [PATCH] Revert "COsdSetup: kill instance of osd_menu_colors" This reverts commit 14124c7dd6dcc7274560658842ac95912d42b06e. With this commit were crashes are to be expected. If here is an issue, we should fix it with another solution. --- src/gui/osd_setup.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index cec557b0a..5ae62f0ef 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -569,11 +569,10 @@ int COsdSetup::showOsdSetup() osd_menu->addIntroItems(LOCALE_MAINSETTINGS_OSD); //item 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); - + 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); + } 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);