mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-07-21 10:01:55 -05:00
MailBox fix (#4377)
* Catches Out Of Bounds error on ListBox SelectedIndex for when the B_PartyDown_Click event is triggered and the current Selection is in LB_PCBOX.
This commit is contained in:
parent
e2d73eb866
commit
2cd9632c4a
|
|
@ -586,6 +586,8 @@ private void NUD_MailIDn_ValueChanged(object sender, EventArgs e)
|
|||
|
||||
private void SwapSlots(ListBox lb, bool down)
|
||||
{
|
||||
if (lb.SelectedIndex == -1)
|
||||
return;
|
||||
int index = lb.SelectedIndex;
|
||||
var otherIndex = index + (down ? 1 : -1);
|
||||
if ((uint)otherIndex >= lb.Items.Count)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user