From 0dc6ebda100f273e698d99f51dbf5ef403b95773 Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Fri, 13 Mar 2020 15:45:06 +0000 Subject: [PATCH] Fix npe #515 --- .../com/eu/habbo/threading/runnables/RoomUnitTeleport.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/eu/habbo/threading/runnables/RoomUnitTeleport.java b/src/main/java/com/eu/habbo/threading/runnables/RoomUnitTeleport.java index f71173c3..70761558 100644 --- a/src/main/java/com/eu/habbo/threading/runnables/RoomUnitTeleport.java +++ b/src/main/java/com/eu/habbo/threading/runnables/RoomUnitTeleport.java @@ -35,6 +35,9 @@ public class RoomUnitTeleport implements Runnable { if (roomUnit == null || roomUnit.getRoom() == null) return; + if (room.getLayout() == null) + return; + RoomTile t = this.room.getLayout().getTile((short) this.x, (short) this.y); HabboItem topItem = this.room.getTopItemAt(this.roomUnit.getCurrentLocation().x, this.roomUnit.getCurrentLocation().y);