LCL: combobox: sanity check for ItemIndex

git-svn-id: trunk@55598 -
This commit is contained in:
ondrej 2017-07-27 19:25:38 +00:00
parent 9c4e00108a
commit d1886ddb8d

View File

@ -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);