Fix NullPointerExceptions

This commit is contained in:
Alejandro 2019-08-11 12:26:19 +03:00
parent 992a961814
commit 1bfc2452b7
2 changed files with 2 additions and 1 deletions

View File

@ -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();

View File

@ -4165,6 +4165,7 @@ public class Room implements Comparable<Room>, 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});