diff options
author | simonb <simonb> | 2005-05-06 15:22:24 (GMT) |
---|---|---|
committer | simonb <simonb> | 2005-05-06 15:22:24 (GMT) |
commit | 90fcc93d6e87183c7d2956b4b1e067be25060169 (patch) | |
tree | 2e0a6a22054452c2ea32c8d250b4a32613797feb /src/FbTk | |
parent | d6ee96775dfdf0ee8bb2f00537f11a335c9b5a18 (diff) | |
download | fluxbox-90fcc93d6e87183c7d2956b4b1e067be25060169.zip fluxbox-90fcc93d6e87183c7d2956b4b1e067be25060169.tar.bz2 |
fix segfault opportunity in menu
Diffstat (limited to 'src/FbTk')
-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; |