From 1bfc2452b7c60faf7d7382ce16caee1987881784 Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Sun, 11 Aug 2019 12:26:19 +0300 Subject: [PATCH] Fix NullPointerExceptions --- .../com/eu/habbo/habbohotel/games/freeze/FreezeGameTeam.java | 2 +- src/main/java/com/eu/habbo/habbohotel/rooms/Room.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGameTeam.java b/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGameTeam.java index ab57f565..cb3bd3c8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGameTeam.java +++ b/src/main/java/com/eu/habbo/habbohotel/games/freeze/FreezeGameTeam.java @@ -14,7 +14,7 @@ public class FreezeGameTeam extends GameTeam { @Override public void removeMember(GamePlayer gamePlayer) { - if (gamePlayer.getHabbo() == null || gamePlayer.getHabbo().getHabboInfo().getCurrentRoom() == null) return; + if (gamePlayer == null || gamePlayer.getHabbo() == null || gamePlayer.getHabbo().getHabboInfo().getCurrentRoom() == null) return; Game game = gamePlayer.getHabbo().getHabboInfo().getCurrentRoom().getGame(FreezeGame.class); Room room = gamePlayer.getHabbo().getRoomUnit().getRoom(); diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index dcb66cdc..1450878a 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -4165,6 +4165,7 @@ public class Room implements Comparable, ISerialize, Runnable { } public void unIdle(Habbo habbo) { + if (habbo == null || habbo.getRoomUnit() == null) return; habbo.getRoomUnit().resetIdleTimer(); this.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); WiredHandler.handle(WiredTriggerType.UNIDLES, habbo.getRoomUnit(), this, new Object[]{habbo});