From 4a334fb563693594317bd38b276e682918a135e7 Mon Sep 17 00:00:00 2001 From: Ilany Date: Mon, 21 Sep 2020 15:41:51 +0200 Subject: [PATCH] Fixed vendingmachines NPE --- .../items/interactions/InteractionVendingMachine.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionVendingMachine.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionVendingMachine.java index 4fdd0eb1..ca0175a2 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionVendingMachine.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionVendingMachine.java @@ -34,8 +34,12 @@ public class InteractionVendingMachine extends HabboItem { } public THashSet getActivatorTiles(Room room) { - THashSet tiles = new THashSet(); - tiles.add(getSquareInFront(room.getLayout(), this)); + THashSet tiles = new THashSet<>(); + RoomTile tileInFront = getSquareInFront(room.getLayout(), this); + + if (tileInFront != null) + tiles.add(tileInFront); + tiles.add(room.getLayout().getTile(this.getX(), this.getY())); return tiles; }