From: DeaDDooMER Date: Sun, 10 Nov 2019 13:19:40 +0000 (+0300) Subject: fix crash when cancell map downloding X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=cc4009721e680c14bb8c0f0fcffbea7fb99b414d;p=d2df-sdl.git fix crash when cancell map downloding --- diff --git a/src/game/g_net.pas b/src/game/g_net.pas index 74de6ec..6388eeb 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -1844,7 +1844,7 @@ end; 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: