mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Fix set import shortly after starting program
CB_Form is not yet initialized with items, do a little sanity checking before setting index to 0. Closes #729
This commit is contained in:
parent
e13b473979
commit
ed52aa31e1
1 changed files with 1 additions and 1 deletions
|
@ -525,7 +525,7 @@ namespace PKHeX.WinForms
|
|||
for (int i = 0; i < formStrings.Length; i++)
|
||||
if (formStrings[i].Contains(Set.Form ?? ""))
|
||||
{ form = i; break; }
|
||||
CB_Form.SelectedIndex = form;
|
||||
CB_Form.SelectedIndex = Math.Min(CB_Form.Items.Count-1, form);
|
||||
|
||||
// Set Ability
|
||||
int[] abilities = SAV.Personal.getAbilities(Set.Species, form);
|
||||
|
|
Loading…
Add table
Reference in a new issue