Thing/Linedef/Sector editing dialog: fixed a crash when pressing the up key in the action input box when the last action is selected. Fixes #493.

This commit is contained in:
biwa 2020-10-25 01:52:49 +02:00
parent 8330c70a41
commit bb5780cf28

View file

@ -251,7 +251,7 @@ namespace CodeImp.DoomBuilder.Controls
}
if(e.KeyCode == Keys.Up)
{
if(list.SelectedIndex < list.Items.Count)
if(list.SelectedIndex < list.Items.Count - 1)
{
list.SelectedIndex++;
list_SelectionChangeCommitted(list, EventArgs.Empty);