From 57b13360ce002c602f40dcbb906aa9b6cda24374 Mon Sep 17 00:00:00 2001 From: Beny Date: Wed, 15 May 2019 18:09:06 +0100 Subject: [PATCH] Fix NullPointerException in InteractionSwitch --- .../habbo/habbohotel/items/interactions/InteractionSwitch.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionSwitch.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionSwitch.java index 5a82e972..7072cb8c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionSwitch.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionSwitch.java @@ -43,6 +43,9 @@ public class InteractionSwitch extends InteractionDefault @Override public void onClick(GameClient client, Room room, Object[] objects) throws Exception { + if(client == null) + return; + if (!this.canToggle(client.getHabbo(), room)) { RoomTile closestTile = null;