From 3c5d236555b6081a4988bb67db101ed8dc8cd8ec Mon Sep 17 00:00:00 2001 From: rosenfield Date: Mon, 8 Oct 2007 16:56:43 +0000 Subject: [PATCH] Bugfix: Don't try to access element -1 of a collection. Please enable DEBUGGING in your builds so you can catch these sort of things before release time. --- source/childwin.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/childwin.pas b/source/childwin.pas index a778b6fc..575596f7 100644 --- a/source/childwin.pas +++ b/source/childwin.pas @@ -4329,7 +4329,7 @@ begin begin Text := (src as TTreeView).Selected.Text; end - else if src = lboxQueryHelpers then + else if (src = lboxQueryHelpers) and ((src as TListBox).ItemIndex > -1) then begin Text := (src as TListBox).Items[(src as TListBox).ItemIndex]; if tabsetQueryHelpers.TabIndex = 3 then