projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7005241
)
Empty menus shouldn't lead to crashs anymore.
author
Tobias Gläßer
<tobi.web@gmx.de>
Sat, 7 Aug 2004 11:34:41 +0000
(11:34 +0000)
committer
Tobias Gläßer
<tobi.web@gmx.de>
Sat, 7 Aug 2004 11:34:41 +0000
(11:34 +0000)
SVN-Revision: 1719
lib/gui/menu.cpp
patch
|
blob
|
history
diff --git
a/lib/gui/menu.cpp
b/lib/gui/menu.cpp
index
28e6eff
..
d35f6d9
100644
(file)
--- a/
lib/gui/menu.cpp
+++ b/
lib/gui/menu.cpp
@@
-770,7
+770,7
@@
Menu::event(SDL_Event& event)
/* An International Character. */
}
/* An International Character. */
}
- if(item[active_item].kind == MN_CONTROLFIELD_KB)
+ if(item
.size() > 0 && item
[active_item].kind == MN_CONTROLFIELD_KB)
{
if(key == SDLK_ESCAPE)
{
{
if(key == SDLK_ESCAPE)
{
@@
-798,7
+798,7
@@
Menu::event(SDL_Event& event)
menuaction = MENU_ACTION_RIGHT;
break;
case SDLK_SPACE:
menuaction = MENU_ACTION_RIGHT;
break;
case SDLK_SPACE:
- if(item[active_item].kind == MN_TEXTFIELD)
+ if(item
.size() > 0 && item
[active_item].kind == MN_TEXTFIELD)
{
menuaction = MENU_ACTION_INPUT;
mn_input_char = ' ';
{
menuaction = MENU_ACTION_INPUT;
mn_input_char = ' ';
@@
-848,7
+848,7
@@
Menu::event(SDL_Event& event)
}
break;
case SDL_JOYBUTTONDOWN:
}
break;
case SDL_JOYBUTTONDOWN:
- if (item[active_item].kind == MN_CONTROLFIELD_JS)
+ if (item
.size() > 0 && item
[active_item].kind == MN_CONTROLFIELD_JS)
{
// FIXME: This next line does nothing useable, right?
// *item[active_item].int_p = key;
{
// FIXME: This next line does nothing useable, right?
// *item[active_item].int_p = key;