mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 18:12:05 +08:00
Issue #861: Fix crash when leaving application, broken in previous commit.
This commit is contained in:
@ -10926,14 +10926,15 @@ var
|
||||
VT: TVirtualStringTree;
|
||||
ResultCol: Integer;
|
||||
SessionColor: TColor;
|
||||
Conn: TDBConnection;
|
||||
begin
|
||||
if Column = -1 then
|
||||
Exit;
|
||||
ResultCol := Column -1;
|
||||
if ResultCol < 0 then begin
|
||||
SessionColor := ActiveConnection.Parameters.SessionColor;
|
||||
if SessionColor <> AppSettings.GetDefaultInt(asTreeBackground) then
|
||||
TargetCanvas.Brush.Color := SessionColor
|
||||
Conn := ActiveConnection;
|
||||
if Assigned(Conn) and (Conn.Parameters.SessionColor <> AppSettings.GetDefaultInt(asTreeBackground)) then
|
||||
TargetCanvas.Brush.Color := Conn.Parameters.SessionColor
|
||||
else
|
||||
TargetCanvas.Brush.Color := clBtnFace;
|
||||
TargetCanvas.FillRect(CellRect);
|
||||
|
Reference in New Issue
Block a user