Skip to content

Commit

Permalink
Fix possible NPE from MultiblockDisplayText (GregTechCEu#2453)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrejhead authored Apr 24, 2024
1 parent e9b9425 commit 596a08b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ public Builder addMufflerObstructedLine(boolean isObstructed) {
* Added if structure is formed, the machine is active, and the passed fuelName parameter is not null.
*/
public Builder addFuelNeededLine(String fuelName, int previousRecipeDuration) {
if (!isStructureFormed || !isActive) return this;
if (!isStructureFormed || !isActive || fuelName == null) return this;
ITextComponent fuelNeeded = TextComponentUtil.stringWithColor(TextFormatting.RED, fuelName);
ITextComponent numTicks = TextComponentUtil.stringWithColor(TextFormatting.AQUA,
TextFormattingUtil.formatNumbers(previousRecipeDuration));
Expand Down

0 comments on commit 596a08b

Please sign in to comment.