channellist: fix segfault while virtual zapping and bouquets are empty

Signed-off-by: Thilo Graf <dbt@novatux.de>


Origin commit data
------------------
Commit: 889c996624
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-12-11 (Mon, 11 Dec 2017)

Origin message was:
------------------
- channellist: fix segfault while virtual zapping and bouquets are empty

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
vanhofen
2017-12-11 13:05:18 +01:00
committed by Thilo Graf
parent a99ed9a19d
commit 32797a05de

View File

@@ -1471,7 +1471,10 @@ void CChannelList::virtual_zap_mode(bool up)
g_RCInput->getMsg(&msg, &data, 15*10); // 15 seconds, not user changable
if ((msg == CRCInput::RC_left) || (msg == CRCInput::RC_right)) {
channel = bouquetList->Bouquets[bactive]->channelList->getPrevNextChannel(msg, sl);
if (!bouquetList->Bouquets.empty())
channel = bouquetList->Bouquets[bactive]->channelList->getPrevNextChannel(msg, sl);
else
channel = CNeutrinoApp::getInstance()->channelList->getPrevNextChannel(msg, sl);
bactive = bouquetList->getActiveBouquetNumber();
}
else if (msg == CRCInput::RC_up || msg == CRCInput::RC_down) {