From 1a7230cfffad0a07985d49bf623017f84add1bda Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 23 Mar 2009 01:44:27 +0000 Subject: [PATCH] ide: don't crash when we pressing keys in the empty procedure list (bug #0013377) based on patch of Vladimir Zhirov git-svn-id: trunk@19069 - --- ide/procedurelist.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ide/procedurelist.pas b/ide/procedurelist.pas index 962966629f..9e578afbd7 100644 --- a/ide/procedurelist.pas +++ b/ide/procedurelist.pas @@ -581,6 +581,9 @@ end; procedure TProcedureListForm.edMethodsKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin + if LV.Items.Count = 0 then + Exit; + if Key = VK_Down then begin if (LV.Items.IndexOf(LV.ItemFocused) + 1) < LV.Items.Count then