From 7ab78798b695c90164ec362c88ab117563bd4de7 Mon Sep 17 00:00:00 2001 From: skeletor Date: Fri, 13 Mar 2020 10:47:20 -0400 Subject: [PATCH] fixed nullpointer exception in RoomUnit.java --- src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java index e0aa77b9..a8c0e831 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java @@ -761,6 +761,8 @@ public class RoomUnit { } public RoomTile getClosestAdjacentTile(short x, short y, boolean diagonal) { + if(room == null) return null; + RoomTile baseTile = room.getLayout().getTile(x, y); if (baseTile == null) return null;