mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 02:32:51 +02:00
* Indy fix (freeonterminate workaround)
git-svn-id: trunk@2098 -
This commit is contained in:
parent
a5276e396e
commit
2dbe7d22c2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user