Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'null' Protection to AtBDynamicScenarioFactory #5787

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3695,6 +3695,12 @@ public static void setPlayerDeploymentTurns(AtBDynamicScenario scenario, Campaig
// it there would likely break things for non-StratCon users. -- Illiani
Collection<ScenarioForceTemplate> templates = scenario.getPlayerForceTemplates().values();
for (ScenarioForceTemplate template : templates) {
if (template == null) {
// I don't know why 'templates' sometimes contains 'null' templates, but it
// does and this stops them from gumming up the works.
continue;
}

if (Objects.equals(template.getForceName(), ScenarioForceTemplate.PRIMARY_FORCE_TEMPLATE_ID)) {
if (primaryForceIDs.contains(forceID)) {
deployRound = template.getArrivalTurn();
Expand Down
Loading