avoid null pointer use

Origin commit data
------------------
Branch: ni/coolstream
Commit: 8fb4e1b78e
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-04-21 (Thu, 21 Apr 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2016-04-21 15:29:18 +02:00
parent d44c7b1a9d
commit bc92bf0e62
6 changed files with 16 additions and 12 deletions

View File

@@ -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);