Permalink
Browse files

Fix crash when having query history expanded without an active connec…

…tion
  • Loading branch information...
ansgarbecker committed Mar 22, 2018
1 parent 83d6b02 commit 51fcf379bbc6d26659021c8c29f5685f434288d4
Showing with 2 additions and 1 deletion.
  1. +2 −1 source/main.pas
@@ -11503,7 +11503,8 @@ procedure TMainForm.treeQueryHelpersPaintText(Sender: TBaseVirtualTree; const Ta
TargetCanvas.Font.Color := DatatypeCategories[SelectedTableColumns[Node.Index].DataType.Category].Color;
end;
if (Sender.GetNodeLevel(Node)=2)
and (Node.Parent.Parent.Index=HELPERNODE_HISTORY) then begin
and (Node.Parent.Parent.Index=HELPERNODE_HISTORY)
and (ActiveConnection <> nil) then begin
Tab := GetQueryTabByHelpers(Sender);
if Tab <> nil then begin
History := Tab.HistoryDays.Objects[Node.Parent.Index] as TQueryHistory;

0 comments on commit 51fcf37

Please sign in to comment.