aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimonb <simonb>2005-05-06 15:22:24 (GMT)
committersimonb <simonb>2005-05-06 15:22:24 (GMT)
commit90fcc93d6e87183c7d2956b4b1e067be25060169 (patch)
tree2e0a6a22054452c2ea32c8d250b4a32613797feb /src
parentd6ee96775dfdf0ee8bb2f00537f11a335c9b5a18 (diff)
downloadfluxbox-90fcc93d6e87183c7d2956b4b1e067be25060169.zip
fluxbox-90fcc93d6e87183c7d2956b4b1e067be25060169.tar.bz2
fix segfault opportunity in menu
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/Menu.cc5
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
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;