From e098f035838396f86d57654972b7a891bec7e4c5 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 9 Feb 2011 06:06:59 +0000 Subject: [PATCH] do not crash when leaving an empty menu with ok & right git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1127 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1c400862cde9f1f944b01e318b9196c1685998de Author: Jacek Jendrzej Date: 2011-02-09 (Wed, 09 Feb 2011) ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 19d7f63ae..19786e93e 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -541,7 +541,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) case (CRCInput::RC_right): case (CRCInput::RC_ok): { - if(hasItem()) { + if(hasItem() && selected > -1) { //exec this item... CMenuItem* item = items[selected]; item->msg = msg;