Fixed bug with //replace causing a NullPointerException.

This commit is contained in:
sk89q 2010-11-06 22:07:16 -07:00
parent a20ecc0887
commit 19f7456c51

View File

@ -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++;
}