From 6a2334ee896c9c80991c90da48316dd9f3b2bf5a Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Tue, 11 Jun 2019 17:07:15 +0300 Subject: [PATCH] Fix NullPointerException in WiredConditionHabboIsDancing --- .../wired/conditions/WiredConditionHabboIsDancing.java | 2 +- .../wired/conditions/WiredConditionNotHabboIsDancing.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboIsDancing.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboIsDancing.java index ac048fd9..0c706e6e 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboIsDancing.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionHabboIsDancing.java @@ -20,7 +20,7 @@ public class WiredConditionHabboIsDancing extends WiredConditionGroupMember { @Override public boolean execute(RoomUnit roomUnit, Room room, Object[] stuff) { - return roomUnit.getDanceType() != DanceType.NONE; + return roomUnit != null && roomUnit.getDanceType() != DanceType.NONE; } @Override diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotHabboIsDancing.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotHabboIsDancing.java index 3a921e6a..81f1d7f2 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotHabboIsDancing.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/conditions/WiredConditionNotHabboIsDancing.java @@ -20,7 +20,7 @@ public class WiredConditionNotHabboIsDancing extends WiredConditionGroupMember { @Override public boolean execute(RoomUnit roomUnit, Room room, Object[] stuff) { - return roomUnit.getDanceType() == DanceType.NONE; + return roomUnit != null && roomUnit.getDanceType() == DanceType.NONE; } @Override