fixed crash when you press escape when a menu is displayed
This commit is contained in:
parent
e68ee4a5f4
commit
641fc00cd0
1 changed files with 1 additions and 1 deletions
|
@ -794,7 +794,7 @@ void turn_info::show_menu(const std::vector<std::string>& items_arg, int xloc, i
|
|||
static const std::string style = "menu2";
|
||||
const int res = gui::show_dialog(gui_,NULL,"","",
|
||||
gui::MESSAGE,&menu,NULL,"",NULL,NULL,NULL,xloc,yloc,&style);
|
||||
if(res == -1)
|
||||
if(res < 0 || res >= items.size())
|
||||
return;
|
||||
|
||||
const hotkey::HOTKEY_COMMAND cmd = hotkey::string_to_command(items[res]);
|
||||
|
|
Loading…
Add table
Reference in a new issue