From 19f7456c51e3e698d7ca4c623a2dc52ce0bfdf47 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sat, 6 Nov 2010 22:07:16 -0700 Subject: [PATCH] Fixed bug with //replace causing a NullPointerException. --- src/EditSession.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/EditSession.java b/src/EditSession.java index 097ffd421..7d39fd516 100644 --- a/src/EditSession.java +++ b/src/EditSession.java @@ -630,8 +630,9 @@ public class EditSession { Vector pt = new Vector(x, y, z); int curBlockType = getBlock(pt).getID(); - if (fromBlockTypes == null && curBlockType != 0 || - fromBlockTypes.contains(curBlockType)) { + if ((fromBlockTypes == null && curBlockType != 0) || + (fromBlockTypes != null && + fromBlockTypes.contains(curBlockType))) { if (setBlock(pt, toBlock)) { affected++; }