소스 검색

Prevent Access Violation when FNetClients not assigned

willowrose 9 년 전
부모
커밋
69766b1ebf
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      Units/PascalCoin/UNetProtocol.pas

+ 5 - 0
Units/PascalCoin/UNetProtocol.pas

@@ -1223,6 +1223,11 @@ var i : Integer;
 begin
   inherited;
   if (Operation=opRemove) then begin
+    if not Assigned(FNetClients) then // this happens occassionally
+    begin
+      TLog.NewLog(ltdebug,ClassName,'NetServer opRemove notification when NetClients=nil');
+      exit;
+    end;
     i := FNetClients.IndexOf(AComponent);
     if (i>=0) then begin
       FNetClients.Delete(i);