From bfefe5887cb11f6533b9949b86c1764718cb8fcf Mon Sep 17 00:00:00 2001 From: Beny Date: Sat, 18 May 2019 14:17:27 +0100 Subject: [PATCH] Fixed NullPointerException in TradeAcceptEvent --- .../eu/habbo/messages/incoming/trading/TradeAcceptEvent.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/eu/habbo/messages/incoming/trading/TradeAcceptEvent.java b/src/main/java/com/eu/habbo/messages/incoming/trading/TradeAcceptEvent.java index 88c30feb..8a747f0a 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/trading/TradeAcceptEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/trading/TradeAcceptEvent.java @@ -10,6 +10,10 @@ public class TradeAcceptEvent extends MessageHandler public void handle() throws Exception { Habbo habbo = this.client.getHabbo(); + + if(habbo == null || habbo.getHabboInfo() == null || habbo.getHabboInfo().getCurrentRoom() == null) + return; + RoomTrade trade = habbo.getHabboInfo().getCurrentRoom().getActiveTradeForHabbo(habbo); if(trade == null)