X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/85ef2ce64f0cc31a063fccea69fdcc7281d51548..842bb1621ab7617fe2f47da159d89ac513fbd6e2:/dnsasync.pas 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;