From 917e95aea33aa3dac2e0a18ea0216b4ede0d83de Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 31 May 2013 18:54:48 +0200 Subject: [PATCH] CNeutrinoEventList::findEvents - fix iterator --- src/gui/eventlist.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index fcd232e63..78a167d91 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1074,17 +1074,16 @@ bool CNeutrinoEventList::findEvents(void) } CEitManager::getInstance()->getEventsServiceKey(0,evtlist, m_search_epg_item,m_search_keyword, true);//all_chann - std::map::iterator map_it; - CChannelEventList::iterator e; if(!evtlist.empty()){ - for ( e=evtlist.begin(); e!=evtlist.end();){ + std::map::iterator map_it; + CChannelEventList::iterator e; + for ( e=evtlist.begin(); e!=evtlist.end();++e){ map_it = ch_id_map.find(e->channelID); if (map_it != ch_id_map.end()){ e->channelID = map_it->second;//map channelID48 to channelID - ++e; } else{ - evtlist.erase(e);// remove event for not found channels in channelList + evtlist.erase(e--);// remove event for not found channels in channelList } } }