From 889c9966244c77a8a1a47d450d3512c4ee5585a0 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 11 Dec 2017 13:05:18 +0100 Subject: [PATCH] - channellist: fix segfault while virtual zapping and bouquets are empty Signed-off-by: Thilo Graf --- src/gui/channellist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 91be050da..6892988e9 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -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) {