mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +02:00
widget: reset some object vars to NULL, only for sure
Origin commit data
------------------
Commit: 1d7ce79142
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-05 (Sun, 05 Jan 2020)
This commit is contained in:
@@ -1336,7 +1336,8 @@ void CMenuWidget::calcSize()
|
||||
CMenuItem *separator = new CMenuSeparator();
|
||||
height += separator->getHeight();
|
||||
delete separator;
|
||||
|
||||
separator = NULL;
|
||||
|
||||
//scrollbar width
|
||||
scrollbar_width=0;
|
||||
if (total_pages > 1)
|
||||
@@ -1601,6 +1602,7 @@ void CMenuWidget::saveScreen()
|
||||
return;
|
||||
|
||||
delete[] background;
|
||||
background = NULL;
|
||||
int hint_h = 0;
|
||||
if (hint_height)
|
||||
hint_h = OFFSET_INTER + hint_height + OFFSET_SHADOW;
|
||||
@@ -2125,8 +2127,8 @@ int CMenuOptionChooser::exec(CMenuTarget*)
|
||||
*optionValue = options[select].key;
|
||||
optionValname = (char *) options[select].valname;
|
||||
}
|
||||
delete menu;
|
||||
delete selector;
|
||||
delete menu; menu = NULL;
|
||||
delete selector; selector = NULL;
|
||||
} else {
|
||||
for(unsigned int count = 0; count < number_of_options; count++) {
|
||||
if (options[count].key == (*optionValue)) {
|
||||
@@ -2298,8 +2300,8 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
|
||||
ret = menu_return::RETURN_REPAINT;
|
||||
if(select >= 0 && optionValuePtr)
|
||||
*optionValuePtr = options[select];
|
||||
delete menu;
|
||||
delete selector;
|
||||
delete menu; menu = NULL;
|
||||
delete selector; selector = NULL;
|
||||
} else {
|
||||
//select next value
|
||||
for(unsigned int count = 0; count < options.size(); count++) {
|
||||
@@ -2554,7 +2556,7 @@ bool CPINProtection::check()
|
||||
cPIN = "";
|
||||
CPINInput* PINInput = new CPINInput(title, &cPIN, 4, hint);
|
||||
PINInput->exec( getParent(), "");
|
||||
delete PINInput;
|
||||
delete PINInput; PINInput = NULL;
|
||||
hint = LOCALE_PINPROTECTION_WRONGCODE;
|
||||
} while ((cPIN != *validPIN) && !cPIN.empty());
|
||||
return (cPIN == *validPIN);
|
||||
@@ -2574,7 +2576,7 @@ bool CZapProtection::check()
|
||||
CPLPINInput* PINInput = new CPLPINInput(title, &cPIN, 4, hint, fsk);
|
||||
|
||||
res = PINInput->exec(getParent(), "");
|
||||
delete PINInput;
|
||||
delete PINInput; PINInput = NULL;
|
||||
cPIN[4] = 0;
|
||||
strcpy(systemstr, CONFIGDIR "/pinentered.sh ");
|
||||
strcat(systemstr, cPIN.c_str());
|
||||
|
Reference in New Issue
Block a user