From 5bfbae4ca9826814562e2150aa24a3bee812a9cb 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 --- 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;