mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
src/gui/widget/menue.cpp fix segfault if items is empty
Origin commit data
------------------
Branch: ni/coolstream
Commit: 83976f40b4
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-10-27 (Thu, 27 Oct 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -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]) {
|
||||
|
Reference in New Issue
Block a user