Skip to content

Commit dda84f6

Browse files
committed
Issue #8670: Don't resetPilotAndEntity when setting the temp crew if the campaign is null
1 parent e27f06c commit dda84f6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

MekHQ/src/mekhq/campaign/unit/Unit.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6475,8 +6475,12 @@ public void setTempCrew(PersonnelRole personnelRole, int count) {
64756475
} else {
64766476
tempPersonnelRoleMap.put(personnelRole, count);
64776477
}
6478-
resetPilotAndEntity();
6479-
MekHQ.triggerEvent(new UnitChangedEvent(this));
6478+
6479+
if (getCampaign() != null) {
6480+
resetPilotAndEntity();
6481+
MekHQ.triggerEvent(new UnitChangedEvent(this));
6482+
}
6483+
64806484
}
64816485

64826486
/**

0 commit comments

Comments
 (0)