CNeutrinoApp::handleMsg: -fix segfault if Bouquets is empty

This commit is contained in:
Jacek Jendrzej
2013-10-08 07:18:32 +02:00
parent 7ccb3ef387
commit 35b49b302d

View File

@@ -2370,7 +2370,9 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
_show: _show:
int nNewChannel = -1; int nNewChannel = -1;
int old_b = bouquetList->getActiveBouquetNumber(); int old_b = bouquetList->getActiveBouquetNumber();
t_channel_id old_id = bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getActiveChannel_ChannelID(); t_channel_id old_id = 0;
if(!bouquetList->Bouquets.empty())
old_id = bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->getActiveChannel_ChannelID();
//int old_mode = g_settings.channel_mode; //int old_mode = g_settings.channel_mode;
int old_mode = GetChannelMode(); int old_mode = GetChannelMode();
printf("************************* ZAP START: bouquetList %p size %d old_b %d\n", bouquetList, (int)bouquetList->Bouquets.size(), old_b);fflush(stdout); printf("************************* ZAP START: bouquetList %p size %d old_b %d\n", bouquetList, (int)bouquetList->Bouquets.size(), old_b);fflush(stdout);