mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-29 23:06:48 -05:00
Fixed crash when opening SAV_BoxLayout with Gen 4 save
Should fix issue #415
This commit is contained in:
@@ -15,11 +15,21 @@ public SAV_BoxLayout(int box)
|
||||
// Repopulate Wallpaper names
|
||||
CB_BG.Items.Clear();
|
||||
|
||||
if (SAV.Generation == 6)
|
||||
CB_BG.Items.AddRange(Main.GameStrings.wallpapernames);
|
||||
else if (SAV.Generation == 7)
|
||||
CB_BG.Items.AddRange(Main.GameStrings.wallpapernames.Take(16).ToArray());
|
||||
|
||||
switch (SAV.Generation)
|
||||
{
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
CB_BG.Items.AddRange(Main.GameStrings.wallpapernames);
|
||||
break;
|
||||
case 7:
|
||||
CB_BG.Items.AddRange(Main.GameStrings.wallpapernames.Take(16).ToArray());
|
||||
break;
|
||||
default:
|
||||
Util.Error("Box layout is not supported for this game.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Go
|
||||
LB_BoxSelect.Items.Clear();
|
||||
for (int i = 0; i < SAV.BoxCount; i++)
|
||||
|
||||
Reference in New Issue
Block a user