diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 1ba715ec4..beb7c1976 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1248,8 +1248,8 @@ int CChannelList::showLiveBouquet(int key) { if (this->lastChList.size() > 1) { - CChannelList * liveList = new CChannelList(g_Locale->getText(LOCALE_CHANNELLIST_HISTORY), true, true); - liveList->setLiveBouquet(); + CChannelList liveList(g_Locale->getText(LOCALE_CHANNELLIST_HISTORY), true, true); + liveList.setLiveBouquet(); for (unsigned int i = 1; i < this->lastChList.size(); ++i) { @@ -1258,16 +1258,15 @@ int CChannelList::showLiveBouquet(int key) { CZapitChannel* channel = getChannel(channel_id); if (channel) - liveList->addChannel(channel); + liveList.addChannel(channel); } } - if (!liveList->isEmpty()) + if (!liveList.isEmpty()) { this->frameBuffer->paintBackground(); - res = liveList->exec(); + res = liveList.exec(); CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); } - delete liveList; } else ShowHint(LOCALE_MESSAGEBOX_INFO, LOCALE_CHANNELLIST_HISTORY_EMPTY); @@ -1280,15 +1279,15 @@ int CChannelList::showLiveBouquet(int key) { bool isRecord = (!autoshift && CNeutrinoApp::getInstance()->recordingstatus); CChannelList * origList = CNeutrinoApp::getInstance()->channelList; - CChannelList * liveList = new CChannelList(isRecord ? g_Locale->getText(LOCALE_CHANNELLIST_RECORDABLE_CHANNELS) : g_Locale->getText(LOCALE_CHANNELLIST_CURRENT_TP), false, true); - liveList->setLiveBouquet(); + CChannelList liveList(isRecord ? g_Locale->getText(LOCALE_CHANNELLIST_RECORDABLE_CHANNELS) : g_Locale->getText(LOCALE_CHANNELLIST_CURRENT_TP), false, true); + liveList.setLiveBouquet(); if (isRecord) { for (unsigned int i = 0 ; i < (*origList->chanlist).size(); i++) { if (SameTP((*origList->chanlist)[i])) - liveList->addChannel((*origList->chanlist)[i]); + liveList.addChannel((*origList->chanlist)[i]); } } else @@ -1297,17 +1296,16 @@ int CChannelList::showLiveBouquet(int key) for (unsigned int i = 0; i < (*origList->chanlist).size(); i++) { if (((*origList->chanlist)[i]->getChannelID() >> 16) == recid) - liveList->addChannel((*origList->chanlist)[i]); + liveList.addChannel((*origList->chanlist)[i]); } } - if (!liveList->isEmpty()) + if (!liveList.isEmpty()) { - liveList->adjustToChannelID(origList->getActiveChannel_ChannelID()); + liveList.adjustToChannelID(origList->getActiveChannel_ChannelID()); this->frameBuffer->paintBackground(); - res = liveList->exec(); + res = liveList.exec(); CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); } - delete liveList; return res; }