From 90ceaf4dea45c84dcbbc8e63d39693bff116895a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 11 Dec 2017 13:05:18 +0100 Subject: [PATCH] channellist: fix segfault while virtual zapping and bouquets are empty Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/89019ac222a374a04c26cc3beae364e616b2ba7a Author: vanhofen Date: 2017-12-11 (Mon, 11 Dec 2017) Origin message was: ------------------ - channellist: fix segfault while virtual zapping and bouquets are empty --- 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 2215fcc9f..fe07a786b 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1488,7 +1488,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) {