Upstream merge

By: Thinkofdeath <thethinkofdeath@gmail.com>
This commit is contained in:
Spigot
2014-04-03 21:12:44 +01:00
parent b07d19630a
commit fbf54955d5
25 changed files with 100 additions and 98 deletions

View File

@@ -1,4 +1,4 @@
From 33587a89e702d0898fbdc810a883aefa6fb7d321 Mon Sep 17 00:00:00 2001
From 6486bb114b1a6e1a2eb2449abf34119d8b7c93a0 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 18 Mar 2013 20:01:44 +1100
Subject: [PATCH] Prevent NPE in CraftSign
@@ -6,7 +6,7 @@ Subject: [PATCH] Prevent NPE in CraftSign
This commit prevents the constructor of CraftSign throwing an NPE when it cannot get the sign tile entity. Instead it will fallback to a 4 empty lined sign, and not try to do anything to those lines on .update().
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index 1647100..43c4434 100644
index 77717d5..1533dd4 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -14,6 +14,12 @@ public class CraftSign extends CraftBlockState implements Sign {
@@ -28,9 +28,9 @@ index 1647100..43c4434 100644
- if (result) {
+ if (result && sign != null) { // Spigot, add null check
for(int i = 0; i < 4; i++) {
if(lines[i] != null) {
sign.lines[i] = lines[i];
sign.lines = sanitizeLines(lines);
sign.update();
}
--
1.8.3.2
1.8.5.2.msysgit.0