From 3cdb86eefa05f378ceaec66be61e8475ab54e6db Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 25 Oct 2023 07:09:52 +0200 Subject: [PATCH] Fix crash after reconnect, when query helpers' functions are collapsed --- source/main.pas | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/main.pas b/source/main.pas index 8a75819e..d92605dc 100644 --- a/source/main.pas +++ b/source/main.pas @@ -10926,7 +10926,6 @@ var FieldText, FocusedFieldText: String; VT: TVirtualStringTree; ResultCol: Integer; - SessionColor: TColor; Conn: TDBConnection; begin if Column = -1 then @@ -13846,7 +13845,7 @@ begin end; TQueryTab.HelperNodeFunctions: begin Conn := ActiveConnection; - if Conn <> nil then + if (Conn <> nil) and (Conn.SQLFunctions.Count > Integer(Node.Index)) then CellText := Conn.SQLFunctions[Node.Index].Name; end; TQueryTab.HelperNodeKeywords: CellText := MySQLKeywords[Node.Index]; @@ -13886,7 +13885,7 @@ begin end; TQueryTab.HelperNodeFunctions: begin Conn := ActiveConnection; - if Conn <> nil then + if (Conn <> nil) and (Conn.SQLFunctions.Count > Integer(Node.Index)) then CellText := Conn.SQLFunctions[Node.Index].Declaration; end; TQueryTab.HelperNodeProfile: begin