diff --git a/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java b/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java index f2363eca8a..235edaa126 100644 --- a/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java +++ b/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java @@ -3695,6 +3695,12 @@ public static void setPlayerDeploymentTurns(AtBDynamicScenario scenario, Campaig // it there would likely break things for non-StratCon users. -- Illiani Collection 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();