Pārlūkot izejas kodu

set FSocketInitialized to False in TSocketStream.Close (fix AV when Close is called twice)

Ondrej Pokorny 2 gadi atpakaļ
vecāks
revīzija
a518fb1fd5
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      packages/fcl-net/src/ssockets.pp

+ 1 - 0
packages/fcl-net/src/ssockets.pp

@@ -717,6 +717,7 @@ begin
   DoOnClose;
   if FSocketInitialized then
     FHandler.Close; // Ignore the result
+  FSocketInitialized:=False;
   FreeAndNil(FHandler);
   CloseSocket(Handle);
   FClosed:=True;