From 83976f40b41dc55af9b0670d5c02f067c5177077 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 27 Oct 2016 17:06:12 +0200 Subject: [PATCH 1/3] src/gui/widget/menue.cpp fix segfault if items is empty --- src/gui/widget/menue.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 3253c53d7..c80a8ebb4 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -891,9 +891,11 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) pos -= dir * items.size(); wrap = true; } - if (pos >= (int)items.size()) + if (!items.empty() && pos >= (int)items.size()) pos = (int)items.size() - 1; do { + if(items.empty()) + break; CMenuItem* item = items[pos]; if (item->isSelectable()) { if (pos < page_start[current_page + 1] && pos >= page_start[current_page]) { From a71c71edcccb1a96c8b871c88b11f6a5409fad2b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 27 Oct 2016 18:56:13 +0200 Subject: [PATCH 2/3] src/gui/eventlist.cpp supplement to 61105699d44de6874fe346e9d8eff52011ebd197, fix chanel_id in search-mode --- src/gui/eventlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index ddb63f8cb..1fcb9fab6 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -481,7 +481,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna t_channel_id used_id = IS_WEBTV(channel_id) ? channel_id : evtlist[selected].channelID; if (!recDir.empty() && doRecord) //add/remove recording timer events and check/warn for conflicts { - CFollowScreenings m(channel_id, + CFollowScreenings m(used_id, evtlist[selected].startTime, evtlist[selected].startTime + evtlist[selected].duration, evtlist[selected].description, evtlist[selected].eventID, TIMERD_APIDS_CONF, true, "", &evtlist); From 874f54af4b58db012097d909899872c06b32ea6e Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 27 Oct 2016 23:11:43 +0200 Subject: [PATCH 3/3] - cc_item_picture: fix wrong operator in width calculation --- src/gui/components/cc_item_picture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 1fd538ac5..89ffaed86 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -224,7 +224,7 @@ void CComponentsPicture::initCCItem() width = GetWidth4FB_HW_ACC(x+fr_thickness, width-2*fr_thickness)+2*fr_thickness; #endif } - if (keep_dy_aspect & dx){ + if (keep_dy_aspect && dx){ float w_ratio = float(width)*100/(float)dx; height = int(w_ratio*(float)dy/100); }