summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/FbTk/Menu.cc5
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a9198ca..7d70594 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.13 2Changes for 0.9.13
3*05/05/06: 3*05/05/06:
4 * Fix potential segfault menu bug, thanks chenfeng (Simon)
5 Menu.cc
4 * Added more KeyActions to TextBox (thanx to Vadim <suhanov_vadim@mail.ru> 6 * Added more KeyActions to TextBox (thanx to Vadim <suhanov_vadim@mail.ru>
5 Control + LeftArrow -> Moves cursor to the left direction, up to next word. 7 Control + LeftArrow -> Moves cursor to the left direction, up to next word.
6 Control + RightArrow -> to the right direction. 8 Control + RightArrow -> to the right direction.
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index e0e3e7f..e05f531 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -273,6 +273,9 @@ void Menu::lower() {
273} 273}
274 274
275void Menu::nextItem() { 275void Menu::nextItem() {
276 if (menuitems.empty())
277 return;
278
276 int old_which_press = m_which_press; 279 int old_which_press = m_which_press;
277 m_active_index = -1; 280 m_active_index = -1;
278 if (validIndex(old_which_press) && 281 if (validIndex(old_which_press) &&
@@ -308,6 +311,8 @@ void Menu::nextItem() {
308} 311}
309 312
310void Menu::prevItem() { 313void Menu::prevItem() {
314 if (menuitems.empty())
315 return;
311 316
312 int old_which_press = m_which_press; 317 int old_which_press = m_which_press;
313 m_active_index = -1; 318 m_active_index = -1;