fix segfault opportunity in menu
This commit is contained in:
parent
d6ee96775d
commit
90fcc93d6e
2 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 0.9.13
|
||||
*05/05/06:
|
||||
* Fix potential segfault menu bug, thanks chenfeng (Simon)
|
||||
Menu.cc
|
||||
* Added more KeyActions to TextBox (thanx to Vadim <suhanov_vadim@mail.ru>
|
||||
Control + LeftArrow -> Moves cursor to the left direction, up to next word.
|
||||
Control + RightArrow -> to the right direction.
|
||||
|
|
|
@ -273,6 +273,9 @@ void Menu::lower() {
|
|||
}
|
||||
|
||||
void Menu::nextItem() {
|
||||
if (menuitems.empty())
|
||||
return;
|
||||
|
||||
int old_which_press = m_which_press;
|
||||
m_active_index = -1;
|
||||
if (validIndex(old_which_press) &&
|
||||
|
@ -308,6 +311,8 @@ void Menu::nextItem() {
|
|||
}
|
||||
|
||||
void Menu::prevItem() {
|
||||
if (menuitems.empty())
|
||||
return;
|
||||
|
||||
int old_which_press = m_which_press;
|
||||
m_active_index = -1;
|
||||
|
|
Loading…
Reference in a new issue