fix segfault opportunity in menu
simonb simonb
2 files changed,
7 insertions(+),
0 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -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.
M
src/FbTk/Menu.cc
→
src/FbTk/Menu.cc
@@ -273,6 +273,9 @@ menu.window.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::prevItem() { + if (menuitems.empty()) + return; int old_which_press = m_which_press; m_active_index = -1;