From 4b90a5c64348c21e86259e470e1a347e16b0ff61 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 11 May 2012 10:25:04 +0200 Subject: [PATCH] eventlist.cpp:-fix possible segfault Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/61c596a6b9bdc0d4c001b8843a3676bed21f7413 Author: Jacek Jendrzej Date: 2012-05-11 (Fri, 11 May 2012) --- src/gui/eventlist.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index d80e39493..80011f60a 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -1243,11 +1243,17 @@ int CEventFinderMenu::showMenu(void) } else if(*m_search_list == CNeutrinoEventList::SEARCH_LIST_BOUQUET) { - m_search_channelname = bouquetList->Bouquets[*m_search_bouquet_id]->channelList->getName(); + if(bouquetList->Bouquets.size()<*m_search_bouquet_id ){ + *m_search_bouquet_id = bouquetList->getActiveBouquetNumber();; + } + if(!bouquetList->Bouquets.empty()) + m_search_channelname = bouquetList->Bouquets[*m_search_bouquet_id]->channelList->getName(); + else + m_search_channelname =""; } else if(*m_search_list == CNeutrinoEventList::SEARCH_LIST_ALL) { - m_search_channelname ==""; + m_search_channelname =""; } CStringInputSMS stringInput(LOCALE_EVENTFINDER_KEYWORD,m_search_keyword, 20, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789 -_/()<>=+.,:!?\\'");