Skip to content

Commit 44f781e

Browse files
authored
Merge pull request #8456 from IllianiBird/dailyReportSafetyNet
Improvement: Added Safety Net When Adding Daily Report Reports
2 parents 116dc72 + bb569f0 commit 44f781e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

MekHQ/src/mekhq/campaign/Campaign.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
import megamek.client.generator.RandomUnitGenerator;
9696
import megamek.client.ui.util.PlayerColour;
9797
import megamek.codeUtilities.ObjectUtility;
98+
import megamek.codeUtilities.StringUtility;
9899
import megamek.common.Player;
99100
import megamek.common.SimpleTechLevel;
100101
import megamek.common.annotations.Nullable;
@@ -5982,6 +5983,10 @@ public void addReport(final DailyReportType type, final String format, final Obj
59825983
* @param report - the report String
59835984
*/
59845985
public void addReport(DailyReportType type, String report) {
5986+
if (StringUtility.isNullOrBlank(report)) {
5987+
return;
5988+
}
5989+
59855990
if (MekHQ.getMHQOptions().getHistoricalDailyLog()) {
59865991
addInMemoryLogHistory(new HistoricalLogEntry(getLocalDate(), report));
59875992
}

0 commit comments

Comments
 (0)