Skip to content

Commit 7f09e3c

Browse files
committed
Issue 6178: Null check for warehouse for tests
1 parent 9328f0b commit 7f09e3c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

MekHQ/src/mekhq/campaign/parts/Part.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,11 @@ public String getDesc() {
453453
toReturn.append("</b><br/>").append(getDetails()).append("<br/>");
454454
}
455455

456-
toReturn.append("<br> <b>In Warehouse:</b> ")
457-
.append(campaign.getWarehouse()
458-
.getSparePartsCount(this))
459-
.append(' ');
456+
if (campaign.getWarehouse() != null) {
457+
toReturn.append("<br> <b>In Warehouse:</b> ")
458+
.append(campaign.getWarehouse().getSparePartsCount(this))
459+
.append(' ');
460+
}
460461

461462
if (getSkillMin() <= SkillType.EXP_ELITE) {
462463
toReturn.append(getTimeLeft())

0 commit comments

Comments
 (0)