Fix another exception cause for issue #1462

This commit is contained in:
Ansgar Becker
2009-11-17 16:38:41 +00:00
parent 83a8df4f64
commit d2e5d1853b

View File

@@ -3052,7 +3052,7 @@ procedure TMainForm.LogSQL(Msg: WideString; Category: TMySQLLogCategory=lcInfo);
var
snip, IsSQL: Boolean;
begin
if Category = lcDebug then
if (Category = lcDebug) or (csDestroying in ComponentState) then
Exit;
// Shorten very long messages
snip := (prefLogSqlWidth > 0) and (Length(Msg) > prefLogSqlWidth);