Fix crash due to reset AppSettings.SessionPath through LogSQL()

This commit is contained in:
Ansgar Becker
2023-01-18 07:36:57 +01:00
parent 5ce198cdcc
commit 498ebfb5e1

View File

@ -5471,6 +5471,7 @@ var
LogIt: Boolean;
LogItem: TDBLogItem;
begin
OldSettingsPath := AppSettings.SessionPath;
LogItem := TDBLogItem.Create;
LogItem.Category := Category;
if AppSettings.ReadBool(asLogTimestamp) then
@ -5485,8 +5486,6 @@ begin
if csDestroying in ComponentState then
Exit;
OldSettingsPath := AppSettings.SessionPath;
for LogItem in PostponedLogItems do begin
// Log only wanted events