FpDebug: Additional security for b1a29e7546 "race condition during exit". Defer the state, till after the ProcessMessages

(cherry picked from commit 9285940e2b)
This commit is contained in:
Martin 2025-04-21 12:27:36 +02:00
parent c1d338eaaf
commit b94f2d82e8

View File

@ -3565,9 +3565,9 @@ begin
{$POP}
LockRelease;
try
SetState(dsStop);
StopAllWorkers;
FreeDebugThread;
SetState(dsStop); // after FreeDebugThread, which does ProcessMessages
finally
UnlockRelease;
end;