Browse Source

Fixed bug on destroying last Log object

PascalCoin 4 years ago
parent
commit
64624cc2e0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/core/ULog.pas

+ 3 - 1
src/core/ULog.pas

@@ -123,7 +123,9 @@ begin
   FThreadSafeLogEvent.Terminate;
   FThreadSafeLogEvent.WaitFor;
   FreeAndNil(FThreadSafeLogEvent);
-  _logs.Remove(Self);
+  if Assigned(_logs) then begin
+    _logs.Remove(Self);
+  end;
   FreeAndNil(FFileStream);
   l := FLogDataList.LockList;
   try