Merge branch 'master' into pu/msgbox

Origin commit data
------------------
Branch: ni/coolstream
Commit: 9b9d2542e6
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-28 (Fri, 28 Oct 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2016-10-28 08:05:34 +02:00
3 changed files with 5 additions and 3 deletions

View File

@@ -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]) {