eventlist: skip if Bouquets is empty, avoid segfault

Origin commit data
------------------
Commit: 1dace8e69c
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-12-27 (Fri, 27 Dec 2019)
This commit is contained in:
Jacek Jendrzej
2019-12-27 20:51:17 +01:00
committed by vanhofen
parent f6b37dd9fa
commit 3aef372fbc

View File

@@ -265,6 +265,9 @@ void CEventList::readEvents(const t_channel_id channel_id)
void CEventList::getChannelNames(t_channel_id &channel_id, std::string &current_channel_name, std::string &prev_channel_name, std::string &next_channel_name, neutrino_msg_t msg)
{
if(bouquetList->Bouquets.empty()){
return;
}
t_bouquet_id current_bouquet_id = bouquetList->getActiveBouquetNumber();
const unsigned int channel_nr = bouquetList->Bouquets[current_bouquet_id]->channelList->getSize();
if(channel_nr < 2){