From 4c8e3c6fd4c9e3813d46e27e1ad89edab8c528d1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 22 Oct 2016 13:57:46 +0200 Subject: [PATCH] CTestMenu: ensure remove hintbox from screen after pressed exit button. call of hide() was missed. Use hintbox object on stack. Is completely sufficient here. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/912ca8647ec66083a859a8f34566065d05b9b073 Author: Thilo Graf Date: 2016-10-22 (Sat, 22 Oct 2016) --- src/gui/test_menu.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index 53fd1b09e..7120cdfa9 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -283,8 +283,8 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) neutrino_msg_t msg; neutrino_msg_data_t data; CHintBox * khintBox = NULL; - CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "Press button, or press EXIT to return"); - hintBox->paint(); + CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, "Press button, or press EXIT to return"); + hintBox.paint(); while (1) { g_RCInput->getMsg(&msg, &data, 100); @@ -300,15 +300,15 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) delete khintBox; } khintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, keyname); - hintBox->hide(); + hintBox.hide(); khintBox->paint(); } } if (khintBox) delete khintBox; - - delete hintBox; - + + hintBox.hide(); + return res; } #if 0 //some parts DEPRECATED