From 4a1ac9b55c918b8e09c7bc1fe1d17ffc381b9dac Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 14 Apr 2014 13:26:01 +0400 Subject: [PATCH] gui/widget/menue.cpp: fix selected in case saved one do not match new menu size --- src/gui/widget/menue.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index d7bd79543..c04adfa95 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -512,6 +512,9 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) int pos = 0; if (selected > 0 && selected < (int)items.size()) pos = selected; + else if (selected >= (int)items.size()) + selected = -1; + exit_pressed = false; frameBuffer->Lock();