From 537154e3c78eb98cece82f30f21da1421679a1c2 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Thu, 20 Sep 2018 14:18:07 +0200 Subject: [PATCH] pictureviewer: fix segfault if no channelid is present Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3a49fa37b91763cabb0d443fdff73dd5c62a83c7 Author: TangoCash Date: 2018-09-20 (Thu, 20 Sep 2018) --- src/driver/pictureviewer/pictureviewer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index 7d5fa95e6..66bddbbfe 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -543,8 +543,9 @@ bool CPictureViewer::GetLogoName(const uint64_t& channel_id, const std::string& e2filename2[0] = '\0'; CZapitChannel * cc = NULL; - if (CNeutrinoApp::getInstance()->channelList) - cc = CNeutrinoApp::getInstance()->channelList->getChannel(channel_id); + if (channel_id) + if (CNeutrinoApp::getInstance()->channelList) + cc = CNeutrinoApp::getInstance()->channelList->getChannel(channel_id); if (cc) {