Paper/Spigot-Server-Patches/0340-Fix-NPE-Potential-in-CraftBanner.patch
Aikar fa254d2142
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-17 18:01:37 -04:00

23 Zeilen
963 B
Diff

From 61cfeaadf39c294557e456dd4d5a0b1d7a165cb1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 15 Aug 2018 08:46:20 -0400
Subject: [PATCH] Fix NPE Potential in CraftBanner
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
index 4332a03a4..448832101 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
@@ -30,7 +30,7 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme
public void load(TileEntityBanner banner) {
super.load(banner);
- base = DyeColor.getByWoolData((byte) banner.color.getColorIndex());
+ base = banner.color != null ? DyeColor.getByWoolData((byte) banner.color.getColorIndex()) : null; // Paper
patterns = new ArrayList<Pattern>();
if (banner.patterns != null) {
--
2.18.0