mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
gui/channellist.cpp: bug fix, default copy constructor is danger, if class have pointers
This commit is contained in:
@@ -119,7 +119,6 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
|
|||||||
|
|
||||||
CChannelList::~CChannelList()
|
CChannelList::~CChannelList()
|
||||||
{
|
{
|
||||||
chanlist->clear();
|
|
||||||
if(dline){
|
if(dline){
|
||||||
delete dline;
|
delete dline;
|
||||||
dline = NULL;
|
dline = NULL;
|
||||||
|
@@ -236,6 +236,7 @@ public:
|
|||||||
SORT_MAX
|
SORT_MAX
|
||||||
};
|
};
|
||||||
unsigned Size() { return (*chanlist).size(); }
|
unsigned Size() { return (*chanlist).size(); }
|
||||||
|
ZapitChannelList &getChannels() { return channels; };
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1363,13 +1363,11 @@ void CNeutrinoApp::channelsInit(bool bOnly)
|
|||||||
|
|
||||||
TVallList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
|
TVallList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
|
||||||
tmp = TVallList->addBouquet(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
|
tmp = TVallList->addBouquet(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
|
||||||
delete tmp->channelList;
|
tmp->channelList->SetChannelList(&TVchannelList->getChannels());
|
||||||
tmp->channelList = new CChannelList(*TVchannelList);
|
|
||||||
|
|
||||||
RADIOallList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
|
RADIOallList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
|
||||||
tmp = RADIOallList->addBouquet(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
|
tmp = RADIOallList->addBouquet(g_Locale->getText(LOCALE_CHANNELLIST_HEAD));
|
||||||
delete tmp->channelList;
|
tmp->channelList->SetChannelList(&RADIOchannelList->getChannels());
|
||||||
tmp->channelList = new CChannelList(*RADIOchannelList);
|
|
||||||
|
|
||||||
if(TVsatList) delete TVsatList;
|
if(TVsatList) delete TVsatList;
|
||||||
TVsatList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_SATS));
|
TVsatList = new CBouquetList(g_Locale->getText(LOCALE_CHANNELLIST_SATS));
|
||||||
|
Reference in New Issue
Block a user