From 96bf33555f89ae57eaefea3d4af5383170c3512e Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 13 Aug 2015 15:27:25 +0200 Subject: [PATCH] fix possible segfault if chanellist is empty Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/5bfbae4ca9826814562e2150aa24a3bee812a9cb Author: Jacek Jendrzej Date: 2015-08-13 (Thu, 13 Aug 2015) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index c17dbb794..90c72c92d 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1820,6 +1820,9 @@ void CChannelList::paintButtonBar(bool is_current) void CChannelList::paintItem(int pos, const bool firstpaint) { + if( (*chanlist).empty() ){ + return; + } int ypos = y+ theight + pos*fheight; fb_pixel_t color; fb_pixel_t bgcolor;