mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
miscsettings: prevent segfault on hardware that can't shutdown
This commit is contained in:
@@ -157,6 +157,7 @@ const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] =
|
|||||||
int CMiscMenue::showMiscSettingsMenu()
|
int CMiscMenue::showMiscSettingsMenu()
|
||||||
{
|
{
|
||||||
//misc settings
|
//misc settings
|
||||||
|
miscNotifier = NULL; /* for check at exit */
|
||||||
fanNotifier = new CFanControlNotifier();
|
fanNotifier = new CFanControlNotifier();
|
||||||
sectionsdConfigNotifier = new CSectionsdConfigNotifier();
|
sectionsdConfigNotifier = new CSectionsdConfigNotifier();
|
||||||
CMenuWidget misc_menue(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP);
|
CMenuWidget misc_menue(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_MISCSETUP);
|
||||||
@@ -232,6 +233,7 @@ int CMiscMenue::showMiscSettingsMenu()
|
|||||||
int res = misc_menue.exec(NULL, "");
|
int res = misc_menue.exec(NULL, "");
|
||||||
delete fanNotifier;
|
delete fanNotifier;
|
||||||
delete sectionsdConfigNotifier;
|
delete sectionsdConfigNotifier;
|
||||||
|
if (miscNotifier)
|
||||||
delete miscNotifier;
|
delete miscNotifier;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user