mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +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;
|
destructor TThread.Destroy;
|
||||||
begin
|
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!');
|
raise EThreadDestroyCalled.Create('A thread cannot destroy itself except by setting FreeOnTerminate and leaving!');
|
||||||
end;
|
end;
|
||||||
// if someone calls .Free on a thread with
|
// if someone calls .Free on a thread with
|
||||||
|
Loading…
Reference in New Issue
Block a user