mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 08:23:52 +01:00
LCL: combobox: sanity check for ItemIndex
git-svn-id: trunk@55598 -
This commit is contained in:
parent
9c4e00108a
commit
d1886ddb8d
@ -38,7 +38,7 @@ begin
|
||||
// and use the interface based list
|
||||
FItems := NewStrings;
|
||||
|
||||
if FItemIndex <> -1 then
|
||||
if (FItemIndex > -1) and (FItemIndex < FItems.Count) then
|
||||
TWSCustomComboBoxClass(WidgetSetClass).SetItemIndex(Self, FItemIndex);
|
||||
TWSCustomComboBoxClass(WidgetSetClass).SetStyle(Self, FStyle);
|
||||
TWSCustomComboBoxClass(WidgetSetClass).SetArrowKeysTraverseList(Self, FArrowKeysTraverseList);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user