Skip to content

Commit

Permalink
Missing Bay Door review changes (#2878)
Browse files Browse the repository at this point in the history
  • Loading branch information
HoneySkull committed Sep 20, 2021
1 parent ffb22b0 commit 34f540f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions MekHQ/src/mekhq/campaign/parts/MissingBayDoor.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ public void fix() {
replacement.decrementQuantity();

// Calling 'remove()' has the side effect of setting this.parentPart to null.
// Issue #2878
Part _parentPart = parentPart;
// Issue #2878 - Missing Bay Door on reload.
Part parentReference = parentPart;
remove(false);

if (null != _parentPart) {
_parentPart.addChildPart(actualReplacement);
_parentPart.updateConditionFromPart();
if (null != parentReference) {
parentReference.addChildPart(actualReplacement);
parentReference.updateConditionFromPart();
}
}
}
Expand Down

0 comments on commit 34f540f

Please sign in to comment.