mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-02 05:46:47 -05:00
Fix NPE loading Personal Stats for Pokemon with no sprite resource
This has been a really long-standing bug, hopefully it's fixed for good!
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user