Explorar o código

* Indy fix (freeonterminate workaround)

git-svn-id: trunk@2098 -
marco %!s(int64=20) %!d(string=hai) anos
pai
achega
2dbe7d22c2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      rtl/freebsd/tthread.inc

+ 1 - 1
rtl/freebsd/tthread.inc

@@ -205,7 +205,7 @@ end;
 
 destructor TThread.Destroy;
 begin
-  if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) then begin
+  if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate) and not ffinished then begin
     raise EThreadDestroyCalled.Create('A thread cannot destroy itself except by setting FreeOnTerminate and leaving!');
   end;
   // if someone calls .Free on a thread with