mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
avoid null pointer use
This commit is contained in:
@@ -382,7 +382,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
return menu_return::RETURN_EXIT;
|
||||
}
|
||||
else if(actionKey == "rec_dir1") {
|
||||
parent->hide();
|
||||
if (parent)
|
||||
parent->hide();
|
||||
const char *action_str = "RecDir1";
|
||||
if(chooserDir(timerlist[selected].recordingDir, true, action_str, sizeof(timerlist[selected].recordingDir)-1)) {
|
||||
printf("[timerlist] new %s dir %s\n", action_str, timerlist[selected].recordingDir);
|
||||
@@ -391,7 +392,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if(actionKey == "rec_dir2") {
|
||||
parent->hide();
|
||||
if (parent)
|
||||
parent->hide();
|
||||
const char *action_str = "RecDir2";
|
||||
if(chooserDir(timerNew.recordingDir, true, action_str, sizeof(timerNew.recordingDir)-1)) {
|
||||
printf("[timerlist] new %s dir %s\n", action_str, timerNew.recordingDir);
|
||||
|
Reference in New Issue
Block a user