summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2012-06-06 14:49:27 (GMT)
committeranbr <vdr07@deltab.de>2012-06-06 14:49:27 (GMT)
commitc4c8b941de416125d90795dab66a5e61e1e0a014 (patch)
tree9f1e1b7d1ffb104e74a011de81ae86dda9d912f5
parenta6193931be12663aa381e5a7d0b14613e613ddd8 (diff)
downloadvdr-plugin-dvdswitch-c4c8b941de416125d90795dab66a5e61e1e0a014.tar.gz
vdr-plugin-dvdswitch-c4c8b941de416125d90795dab66a5e61e1e0a014.tar.bz2
Avoid seqfault on 0xb70863fa in cMainMenuItem::FileName (this=0x0) at menu-item.h:27
-rw-r--r--commands.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/commands.c b/commands.c
index 1d7bf5a..542647b 100644
--- a/commands.c
+++ b/commands.c
@@ -255,20 +255,22 @@ eOSState cCMDDir::ProcessKey(eKeys Key)
return osContinue;
break;
case kOk:
- info = new cFileInfo(mItem->FileName());
- if(!info->isExecutable() || !info->isReadable())
- {
- esyslog("dvdswitch: Can't access to directory!");
- DELETENULL(info);
- OsdMsg(mtError,tr("No rights to access this directory!"));
- return osContinue;
- break;
+ if(mItem) {
+ info = new cFileInfo(mItem->FileName());
+ if(!info->isExecutable() || !info->isReadable())
+ {
+ esyslog("dvdswitch: Can't access to directory!");
+ DELETENULL(info);
+ OsdMsg(mtError,tr("No rights to access this directory!"));
+ return osContinue;
+ break;
+ }
+ DELETENULL(info);
+ DirHand = new cDirHandling(this, this);
+ DirHand->ProcessKey(mItem);
+ delete(DirHand);
+ Build();
}
- DELETENULL(info);
- DirHand = new cDirHandling(this, this);
- DirHand->ProcessKey(mItem);
- delete(DirHand);
- Build();
break;
case kRed:
if(mItem->Type() == iDir)
@@ -431,6 +433,7 @@ eOSState cCMDDir::New(eKeys Key)
return cOsdMenu::ProcessKey(Key);
}
+
eOSState cCMDDir::Edit(cMainMenuItem *mItem)
{
cFileInfo *info = new cFileInfo(mItem->FileName());