diff --git a/pk3DS/Misc/Patch.cs b/pk3DS/Misc/Patch.cs index d8264d0..7bb347f 100644 --- a/pk3DS/Misc/Patch.cs +++ b/pk3DS/Misc/Patch.cs @@ -109,7 +109,7 @@ private void B_PatchCIA_Click(object sender, EventArgs e) catch (Exception ex) { Util.Error("Could not create patch:", ex.ToString()); - Directory.Delete(patchFolder, true); + if (Directory.Exists(patchFolder)) Directory.Delete(patchFolder, true); } } diff --git a/pk3DS/Subforms/Gen6/PersonalEditor6.cs b/pk3DS/Subforms/Gen6/PersonalEditor6.cs index 36a5d77..ae478ae 100644 --- a/pk3DS/Subforms/Gen6/PersonalEditor6.cs +++ b/pk3DS/Subforms/Gen6/PersonalEditor6.cs @@ -257,6 +257,7 @@ private void readEntry() int[] specForm = { s, f }; string filename = "_" + specForm[0] + (CB_Species.SelectedIndex > 721 ? "_" + (specForm[1] + 1) : ""); Bitmap rawImg = (Bitmap)Resources.ResourceManager.GetObject(filename); + if (rawImg == null) rawImg = Resources.unknown; Bitmap bigImg = new Bitmap(rawImg.Width * 2, rawImg.Height * 2); for (int x = 0; x < rawImg.Width; x++) {