From 39ed9c4d0dccb57d90b8a7e4140638886d30b17f Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Mon, 5 Sep 2016 17:05:27 -0700 Subject: [PATCH] Fix Drag&Drop gen1 error Dunno why it manifests itself only in gen<3, but this fixes the index out of range Reference #235 --- PKHeX/MainWindow/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKHeX/MainWindow/Main.cs b/PKHeX/MainWindow/Main.cs index 2c8a74190..22a25e404 100644 --- a/PKHeX/MainWindow/Main.cs +++ b/PKHeX/MainWindow/Main.cs @@ -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