Fix crash after hitting enter when no units match the recall list filter

Fixes #3475
This commit is contained in:
josteph 2018-08-17 18:09:37 +00:00 committed by Pentarctagon
parent d3650a7814
commit a3047f37d3

View file

@ -385,6 +385,10 @@ void menu_handler::recall(int side_num, const map_location& last_hex)
}
int res = dlg.get_selected_index();
if (res < 0) {
gui2::show_transient_message("", _("No unit recalled"));
return;
}
int unit_cost = current_team.recall_cost();
// we need to check if unit has a specific recall cost