mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-22 20:02:48 +00:00
Fixed a crash that would happen in the texture set editor when double-clicking on the last texture
This commit is contained in:
parent
4febbdadf6
commit
9c8f8916e6
1 changed files with 5 additions and 1 deletions
|
@ -550,7 +550,11 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// Select specific item?
|
||||
if(keepselected > -1)
|
||||
{
|
||||
list.SetSelectedItem(list.Items[keepselected]);
|
||||
// If the last item doesn't exist anymore select the new last item
|
||||
if(keepselected >= list.Items.Count)
|
||||
list.SetSelectedItem(list.Items[list.Items.Count-1]);
|
||||
else
|
||||
list.SetSelectedItem(list.Items[keepselected]);
|
||||
}
|
||||
// Select first item?
|
||||
else if(selectfirst)
|
||||
|
|
Loading…
Reference in a new issue