mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 02:39:29 +02:00
LazLogger: fixed thread race condition. If the logger is destroyed, and threads have pending sync calls. (only observed with custom created loggers). Fix requires fpc 3.2, see issue #0030567
git-svn-id: trunk@62036 -
This commit is contained in:
parent
e6a89c7f7c
commit
57e0e15e0f
@ -255,6 +255,8 @@ end;
|
||||
|
||||
destructor TLazLoggerFileHandleMainThread.Destroy;
|
||||
begin
|
||||
// Call Syncronize (in the main thread) before destroy to catch any pending log
|
||||
TThread.RemoveQueuedEvents(@MainThreadWrite);
|
||||
inherited Destroy;
|
||||
DoneCriticalsection(FWriteToFileLock);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user