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 gfgtdf
parent 215bac859e
commit d6941a96a3

View file

@ -383,6 +383,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