summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2014-05-06 10:37:29 (GMT)
committerAndreas Mair <amair.sob@googlemail.com>2014-05-06 10:37:29 (GMT)
commita1bd80a9e0f218f65bcddedc70fab84b1711b61f (patch)
tree0340eab944d803b7c531c8d948df3103244a7b41
parent8e43c91736a35b197507999ac53de399b0f48dfd (diff)
downloadvdr-plugin-extrecmenu-a1bd80a9e0f218f65bcddedc70fab84b1711b61f.tar.gz
vdr-plugin-extrecmenu-a1bd80a9e0f218f65bcddedc70fab84b1711b61f.tar.bz2
Fixed crashes that happened if a skin used the "menu category" feature. (Submitted by The Chief @vdr-portal.de)
-rw-r--r--mymenurecordings.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mymenurecordings.c b/mymenurecordings.c
index 5e7498d..02e541f 100644
--- a/mymenurecordings.c
+++ b/mymenurecordings.c
@@ -38,6 +38,7 @@ class myMenuRecordingInfo:public cOsdMenu
myMenuRecordingInfo(const cRecording *Recording,bool WithButtons = false);
virtual void Display(void);
virtual eOSState ProcessKey(eKeys Key);
+ virtual ~myMenuRecordingInfo(void);
#ifdef USE_GRAPHTFT
virtual const char* MenuKind(){return "MenuExtRecording";}
#endif
@@ -50,7 +51,7 @@ myMenuRecordingInfo::myMenuRecordingInfo(const cRecording *Recording, bool WithB
SetMenuCategory(mcRecordingInfo);
}
#endif
- recording=Recording;
+ recording = new cRecording(Recording->FileName());
withButtons=WithButtons;
if(withButtons)
SetHelp(tr("Button$Play"),tr("Button$Rewind"),NULL,tr("Button$Back"));
@@ -157,11 +158,15 @@ eOSState myMenuRecordingInfo::ProcessKey(eKeys Key)
return state;
}
+myMenuRecordingInfo::~myMenuRecordingInfo(void) {
+ delete recording;
+}
+
// --- myMenuRecordingsItem ---------------------------------------------------
myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
{
#if VDRVERSNUM >= 10733
- recording=Recording;
+ recording=new cRecording(Recording->FileName());;
#endif
totalentries=newentries=0;
isdvd=false;
@@ -453,6 +458,7 @@ myMenuRecordingsItem::myMenuRecordingsItem(cRecording *Recording,int Level)
myMenuRecordingsItem::~myMenuRecordingsItem()
{
+ delete recording;
free(title);
free(name);
}