* ffinish patch

git-svn-id: trunk@2141 -
This commit is contained in:
marco 2006-01-03 19:09:25 +00:00
parent 9bb86eb411
commit 1318b959e0

View File

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