From 8d949575cd36a15f27e2e8286a35af0fe2f727e2 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 23 Jun 2021 08:37:31 +0200 Subject: [PATCH] Issue #932: fix crash with new color setting when switching from query tab to data tab --- source/main.pas | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/main.pas b/source/main.pas index 46760571..6aaf0579 100644 --- a/source/main.pas +++ b/source/main.pas @@ -6416,11 +6416,13 @@ begin actCodeFoldingStartRegion.Enabled := InQueryTab; actCodeFoldingEndRegion.Enabled := InQueryTab; actCodeFoldingFoldSelection.Enabled := HasSelection; - if HasConnection and (Conn.Parameters.SessionColor <> clNone) then begin - Tab.Memo.Gutter.Color := Conn.Parameters.SessionColor; - end - else begin - Tab.Memo.Gutter.Color := clBtnFace; + if InQueryTab then begin + if HasConnection and (Conn.Parameters.SessionColor <> clNone) then begin + Tab.Memo.Gutter.Color := Conn.Parameters.SessionColor; + end + else begin + Tab.Memo.Gutter.Color := clBtnFace; + end; end; end;