mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
-fix possible segfault if selected > items.size()
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1920 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -494,7 +494,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||
|
||||
do {
|
||||
if(hasItem() && selected >= 0)
|
||||
if(hasItem() && selected >= 0 && (int)items.size() > selected )
|
||||
bAllowRepeatLR = items[selected]->can_arrow;
|
||||
|
||||
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd, bAllowRepeatLR);
|
||||
@@ -657,7 +657,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
|
||||
case (CRCInput::RC_right):
|
||||
case (CRCInput::RC_ok):
|
||||
{
|
||||
if(hasItem() && selected > -1) {
|
||||
if(hasItem() && selected > -1 && (int)items.size() > selected) {
|
||||
//exec this item...
|
||||
CMenuItem* item = items[selected];
|
||||
item->msg = msg;
|
||||
|
Reference in New Issue
Block a user