diff options
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r-- | src/FbTk/Menu.cc | 5 |
1 files changed, 5 insertions, 0 deletions
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 | ||
275 | void Menu::nextItem() { | 275 | void 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 | ||
310 | void Menu::prevItem() { | 313 | void 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; |