X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/85ef2ce64f0cc31a063fccea69fdcc7281d51548..0ac6b47e810e6efaebcdbf3075b633e9b4109341:/dnsasync.pas?ds=inline diff --git a/dnsasync.pas b/dnsasync.pas index 8c3ce3a..a8e1aa6 100755 --- a/dnsasync.pas +++ b/dnsasync.pas @@ -100,12 +100,14 @@ var socketno : integer; begin for socketno := 0 to numsock -1 do begin - if dnsserverids[socketno] >= 0 then begin - reportlag(dnsserverids[socketno],-1); - dnsserverids[socketno] := -1; - end; - sockets[socketno].release; - setstate_request_init('',states[socketno]); + if assigned(sockets[socketno]) then begin + if dnsserverids[socketno] >= 0 then begin + reportlag(dnsserverids[socketno],-1); + dnsserverids[socketno] := -1; + end; + sockets[socketno].release; + setstate_request_init('',states[socketno]); + end; end; inherited destroy; end;