From 01b8c421df08f8d8e738b2ff7d9120dff70da7d6 Mon Sep 17 00:00:00 2001 From: asofold Date: Mon, 28 Oct 2013 11:24:48 +0100 Subject: [PATCH] Fix one NPE. --- .../java/fr/neatmonster/nocheatplus/checks/moving/Passable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java index dad1adf3..ea738983 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Passable.java @@ -129,7 +129,7 @@ public class Passable extends Check { // Prefer the set-back location from the data. if (data.hasSetBack()){ final Location ref = data.getSetBack(to); - if (BlockProperties.isPassable(from.getBlockCache(), ref) || TrigUtil.distance(from, loc) > 0.13){ + if (BlockProperties.isPassable(from.getBlockCache(), ref) || loc != null && TrigUtil.distance(from, loc) > 0.13){ // if (BlockProperties.isPassableExact(from.getBlockCache(), ref)){ loc = ref; if (cc.debug) {