Fallback to the End Turn action's default title...
...if there's no End Turn button in the theme GUI when displaying a context menu a) Yes, it makes sense to not have an End Turn button. b) No, it doesn't make sense to rely on the existence of an End Turn button. c) Yes, this change is completely harmless.
This commit is contained in:
parent
b7ef47690b
commit
9f03006d61
1 changed files with 3 additions and 2 deletions
|
@ -1290,8 +1290,9 @@ std::vector<std::string> command_executor::get_menu_images(display &disp, const
|
|||
std::string desc = hk.get_description();
|
||||
if (hk.get_id() == HOTKEY_ENDTURN) {
|
||||
const theme::menu *b = disp.get_theme().get_menu_item("button-endturn");
|
||||
assert(b);
|
||||
desc = b->title();
|
||||
if(b) {
|
||||
desc = b->title();
|
||||
}
|
||||
}
|
||||
str << desc << COLUMN_SEPARATOR << hk.get_name();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue