fixed crash when replacing recording menu with extrecmenu

This commit is contained in:
louis 2016-09-24 14:25:58 +02:00
parent ead8056990
commit cc1efd1d2e
2 changed files with 9 additions and 5 deletions

View File

@ -1610,6 +1610,7 @@ cLeMenuRecordings::cLeMenuRecordings(const cLeMenuRecordings &other) : cListElem
}
cLeMenuRecordings::~cLeMenuRecordings(void) {
delete recording;
}
void cLeMenuRecordings::SetTokenContainer(void) {
@ -1657,7 +1658,7 @@ void cLeMenuRecordings::ClearCurrentElement(void) {
}
void cLeMenuRecordings::Set(const cRecording *recording, int level, int total, int New) {
this->recording = recording;
this->recording = new cRecording(recording->FileName());
this->level = level;
this->total = total;
this->New = New;
@ -1841,6 +1842,7 @@ cCeMenuRecordings::cCeMenuRecordings(void) {
}
cCeMenuRecordings::~cCeMenuRecordings(void) {
delete recording;
}
void cCeMenuRecordings::SetTokenContainer(void) {

View File

@ -535,10 +535,12 @@ bool cViewMenu::Init(void) {
}
void cViewMenu::Close(void) {
animator->Stop();
animator->Finish();
delete animator;
animator = NULL;
if (animator) {
animator->Stop();
animator->Finish();
delete animator;
animator = NULL;
}
for (int i=0; i < numSubviews; i++) {
if (subViews[i]) {
subViews[i]->Close();