mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-29 17:07:03 -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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user