Fix Drag&Drop gen1 error

Dunno why it manifests itself only in gen<3, but this fixes the index
out of range

Reference #235
This commit is contained in:
Kaphotics 2016-09-05 17:05:27 -07:00
parent 1eff18b6f8
commit 39ed9c4d0d

View file

@ -3699,7 +3699,7 @@ namespace PKHeX
getQuickFiller(pb, SAV.getStoredSlot(DragInfo.slotSourceOffset));
pb.BackgroundImage = null;
if (DragInfo.slotDestinationBoxNumber == DragInfo.slotSourceBoxNumber)
if (DragInfo.slotDestinationBoxNumber == DragInfo.slotSourceBoxNumber && DragInfo.slotDestinationSlotNumber > -1)
SlotPictureBoxes[DragInfo.slotDestinationSlotNumber].Image = img;
if (result == DragDropEffects.Copy) // viewed in tabs, apply 'view' highlight