From f7cfe0256b1dfd8e5360c1ba338085e8d09b8961 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 8 Dec 2016 16:16:57 +0100 Subject: [PATCH] src/gui/timerlist.cpp dont check empty timerlist --- src/gui/timerlist.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 7b18e5b04..55902b379 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1377,16 +1377,18 @@ void CTimerList::paintHead() void CTimerList::paintFoot() { - CTimerd::responseGetTimer* timer=&timerlist[selected]; - if (timer != NULL) + if(!timerlist.empty() ) { + CTimerd::responseGetTimer* timer=&timerlist[selected]; + if (timer != NULL) + { //replace info button with dummy if timer is not type REC or ZAP - if (timer->eventType == CTimerd::TIMER_RECORD || timer->eventType == CTimerd::TIMER_REMOTEBOX || timer->eventType == CTimerd::TIMER_ZAPTO) - TimerListButtons[4].button = NEUTRINO_ICON_BUTTON_INFO_SMALL; - else - TimerListButtons[4].button = NEUTRINO_ICON_BUTTON_DUMMY_SMALL; + if (timer->eventType == CTimerd::TIMER_RECORD || timer->eventType == CTimerd::TIMER_REMOTEBOX || timer->eventType == CTimerd::TIMER_ZAPTO) + TimerListButtons[4].button = NEUTRINO_ICON_BUTTON_INFO_SMALL; + else + TimerListButtons[4].button = NEUTRINO_ICON_BUTTON_DUMMY_SMALL; + } } - //shadow frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + height - footerHeight, width, footerHeight + OFFSET_SHADOW, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);