From b978594b1a17e76bbb528e521ba26979da96ccfa Mon Sep 17 00:00:00 2001 From: seife Date: Mon, 17 Jan 2011 22:27:08 +0000 Subject: [PATCH] neutrino: do not crash when leaving an empty menu with "left" git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1031 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/widget/menue.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 3f194955e..950e3e1df 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -535,7 +535,8 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) } break; case (CRCInput::RC_left): - if(( hasItem() && !(items[selected]->can_arrow)) || g_settings.menu_left_exit) { + if ((hasItem() && (selected < 0 || !items[selected]->can_arrow)) || + g_settings.menu_left_exit) { msg = CRCInput::RC_timeout; break; }