Skip to content

Commit

Permalink
Fix crash after hitting enter when no units match the recall list filter
Browse files Browse the repository at this point in the history
Fixes #3475
  • Loading branch information
jostephd authored and Pentarctagon committed Aug 17, 2018
1 parent d3650a7 commit a3047f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/menu_events.cpp
Expand Up @@ -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
Expand Down

0 comments on commit a3047f3

Please sign in to comment.