Fix NullPointerException in RoomManager.openRoom

This commit is contained in:
Alejandro 2020-02-27 22:33:08 +02:00
parent 4c77c76bdc
commit 166d8e8f40

View File

@ -596,7 +596,7 @@ public class RoomManager {
habbo.getRoomUnit().clearStatus();
if (habbo.getRoomUnit().getCurrentLocation() == null) {
habbo.getRoomUnit().setLocation(doorLocation != null ? doorLocation : room.getLayout().getDoorTile());
habbo.getRoomUnit().setZ(habbo.getRoomUnit().getCurrentLocation().getStackHeight());
if (habbo.getRoomUnit().getCurrentLocation() != null) habbo.getRoomUnit().setZ(habbo.getRoomUnit().getCurrentLocation().getStackHeight());
if (doorLocation == null) {
habbo.getRoomUnit().setBodyRotation(RoomUserRotation.values()[room.getLayout().getDoorDirection()]);