mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
gui/update_menue.cpp: fix crash in dtor, CMenuForwarder is deleted on menu delete
This commit is contained in:
@@ -51,13 +51,11 @@ CSoftwareUpdate::CSoftwareUpdate()
|
|||||||
{
|
{
|
||||||
width = w_max (40, 10);
|
width = w_max (40, 10);
|
||||||
fe = new CFlashExpert();
|
fe = new CFlashExpert();
|
||||||
update_item = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CSoftwareUpdate::~CSoftwareUpdate()
|
CSoftwareUpdate::~CSoftwareUpdate()
|
||||||
{
|
{
|
||||||
delete fe;
|
delete fe;
|
||||||
delete update_item;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CSoftwareUpdate::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
|
int CSoftwareUpdate::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
|
||||||
@@ -82,14 +80,8 @@ int CSoftwareUpdate::showSoftwareUpdate()
|
|||||||
|
|
||||||
//flashing
|
//flashing
|
||||||
CFlashUpdate flash;
|
CFlashUpdate flash;
|
||||||
#if 0
|
|
||||||
neutrino_locale_t up_text = (g_settings.softupdate_mode == 0) ? LOCALE_FLASHUPDATE_CHECKUPDATE_LOCAL : LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET;
|
|
||||||
update_item = new CMenuForwarder(up_text, true, NULL, &flash, NULL, CRCInput::RC_red);
|
|
||||||
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK);
|
|
||||||
softUpdate.addItem(update_item);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, true, NULL, &flash, "inet", CRCInput::RC_red);
|
CMenuForwarder *update_item = new CMenuForwarder(LOCALE_FLASHUPDATE_CHECKUPDATE_INTERNET, true, NULL, &flash, "inet", CRCInput::RC_red);
|
||||||
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK);
|
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK);
|
||||||
softUpdate.addItem(update_item);
|
softUpdate.addItem(update_item);
|
||||||
|
|
||||||
@@ -97,7 +89,7 @@ int CSoftwareUpdate::showSoftwareUpdate()
|
|||||||
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK_LOCAL);
|
update_item->setHint("", LOCALE_MENU_HINT_SOFTUPDATE_CHECK_LOCAL);
|
||||||
softUpdate.addItem(update_item);
|
softUpdate.addItem(update_item);
|
||||||
|
|
||||||
CUpdateSettings update_settings(update_item);
|
CUpdateSettings update_settings;
|
||||||
CMenuWidget mtdexpert(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_MTDEXPERT);
|
CMenuWidget mtdexpert(LOCALE_FLASHUPDATE_EXPERTFUNCTIONS, NEUTRINO_ICON_UPDATE, width, MN_WIDGET_ID_MTDEXPERT);
|
||||||
//settings
|
//settings
|
||||||
if (!g_settings.easymenu) {
|
if (!g_settings.easymenu) {
|
||||||
|
@@ -40,7 +40,6 @@ class CSoftwareUpdate : public CMenuTarget
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int width;
|
int width;
|
||||||
CMenuForwarder * update_item;
|
|
||||||
int showSoftwareUpdate();
|
int showSoftwareUpdate();
|
||||||
void showSoftwareUpdateExpert(CMenuWidget *w_mtd_expert);
|
void showSoftwareUpdateExpert(CMenuWidget *w_mtd_expert);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user