diff --git a/src/engine/net/client/Protocol.java b/src/engine/net/client/Protocol.java index d32a42ec..2ac3bad2 100644 --- a/src/engine/net/client/Protocol.java +++ b/src/engine/net/client/Protocol.java @@ -291,9 +291,11 @@ public enum Protocol { if (msg == null) return false; + Protocol protocol = null; + try { - Protocol protocol = msg.getProtocolMsg(); + protocol = msg.getProtocolMsg(); // Unhandled opcode @@ -308,7 +310,7 @@ public enum Protocol { protocol.handler.handleNetMsg(msg); } catch (Exception e) { - Logger.error("handler for " + msg.getProtocolMsg() + " failed: " + e); + Logger.error("handler for " + protocol + " failed: " + e); return false; }