diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index 74de6ec26d76f08cd8004763828bfd4550709018..217825ea98184bec8fdafb7d9f6be59e90fc3339 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
e_log, e_msg, ENet, Classes, md5, MAPDEF{$IFDEF USE_MINIUPNPC}, miniupnpc;{$ELSE};{$ENDIF}
const
- NET_PROTOCOL_VER = 182;
+ NET_PROTOCOL_VER = 184;
NET_MAXCLIENTS = 24;
NET_CHANS = 12;
function g_Net_Client_Update(): enet_size_t;
begin
Result := 0;
- while (enet_host_service(NetHost, @NetEvent, 0) > 0) do
+ while (NetHost <> nil) and (enet_host_service(NetHost, @NetEvent, 0) > 0) do
begin
case NetEvent.kind of
ENET_EVENT_TYPE_RECEIVE: