Fix NPE when blowing up an item frame. Fixes BUKKIT-2763

This commit is contained in:
Travis Watkins 2012-10-31 11:30:29 -05:00 committed by EvilSeph
parent f479aa84a4
commit 347fd3cb6e

View file

@ -226,7 +226,7 @@ public abstract class EntityHanging extends Entity {
this.world.getServer().getPluginManager().callEvent(paintingEvent);
}
if (dead || event.isCancelled() || (paintingEvent != null && paintingEvent.isCancelled())) {
if (dead || (event != null && event.isCancelled()) || (paintingEvent != null && paintingEvent.isCancelled())) {
return true;
}
// CraftBukkit end