From 8f4c53504b4c95cfb63eeceb12d6cc7ed2086928 Mon Sep 17 00:00:00 2001 From: brenoepic <59066707+brenoepics@users.noreply.github.com> Date: Fri, 29 Apr 2022 22:39:44 -0300 Subject: [PATCH] room is nullable here --- .../habbohotel/items/interactions/InteractionVoteCounter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionVoteCounter.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionVoteCounter.java index 54ea473b..b323fa52 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionVoteCounter.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionVoteCounter.java @@ -18,7 +18,7 @@ public class InteractionVoteCounter extends HabboItem { private boolean frozen; private int votes; - private List votedUsers; + private final List votedUsers; public InteractionVoteCounter(ResultSet set, Item baseItem) throws SQLException { super(set, baseItem); @@ -69,7 +69,7 @@ public class InteractionVoteCounter extends HabboItem { @Override public void onClick(GameClient client, Room room, Object[] objects) throws Exception { - if (!((client != null && room != null && room.hasRights(client.getHabbo())) || (objects.length >= 2 && objects[1] instanceof WiredEffectType))) + if (room == null || !((client != null && room.hasRights(client.getHabbo())) || (objects.length >= 2 && objects[1] instanceof WiredEffectType))) return; this.frozen = !this.frozen;