From f57338c2c371348084b1b616d3bbc4baadab9e39 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Wed, 29 Feb 2012 21:19:33 +0100 Subject: [PATCH] fix for error when deleting a gate with no blocks --- src/org/mcteam/ancientgates/Gate.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/org/mcteam/ancientgates/Gate.java b/src/org/mcteam/ancientgates/Gate.java index face817..0a309e9 100644 --- a/src/org/mcteam/ancientgates/Gate.java +++ b/src/org/mcteam/ancientgates/Gate.java @@ -134,8 +134,11 @@ public class Gate { Set blocks = FloodUtil.getGateFrameBlocks(from.getBlock()); - for (Block block : blocks) - block.setType(Material.AIR); + if (blocks != null) + { + for (Block block : blocks) + block.setType(Material.AIR); + } } }