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

Fixes #3475

(cherry-picked from commit a3047f37d3)
This commit is contained in:
josteph 2018-08-17 18:09:37 +00:00 committed by Pentarctagon
parent 635e17e03a
commit 6ac3ffd913

View file

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