CNeutrinoEventList::findEvents - fix iterator

This commit is contained in:
Jacek Jendrzej
2013-05-31 18:54:48 +02:00
parent 93a428c817
commit 917e95aea3

View File

@@ -1074,17 +1074,16 @@ bool CNeutrinoEventList::findEvents(void)
} }
CEitManager::getInstance()->getEventsServiceKey(0,evtlist, m_search_epg_item,m_search_keyword, true);//all_chann CEitManager::getInstance()->getEventsServiceKey(0,evtlist, m_search_epg_item,m_search_keyword, true);//all_chann
if(!evtlist.empty()){
std::map<t_channel_id, t_channel_id>::iterator map_it; std::map<t_channel_id, t_channel_id>::iterator map_it;
CChannelEventList::iterator e; CChannelEventList::iterator e;
if(!evtlist.empty()){ for ( e=evtlist.begin(); e!=evtlist.end();++e){
for ( e=evtlist.begin(); e!=evtlist.end();){
map_it = ch_id_map.find(e->channelID); map_it = ch_id_map.find(e->channelID);
if (map_it != ch_id_map.end()){ if (map_it != ch_id_map.end()){
e->channelID = map_it->second;//map channelID48 to channelID e->channelID = map_it->second;//map channelID48 to channelID
++e;
} }
else{ else{
evtlist.erase(e);// remove event for not found channels in channelList evtlist.erase(e--);// remove event for not found channels in channelList
} }
} }
} }