mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-22 00:36:40 -05:00
fix use before init
This commit is contained in:
@@ -8,7 +8,13 @@ public partial class SizeCP : UserControl
|
||||
{
|
||||
private PB7 pkm;
|
||||
private bool Loading;
|
||||
public SizeCP() => InitializeComponent();
|
||||
public SizeCP()
|
||||
{
|
||||
InitializeComponent();
|
||||
Initialized = true;
|
||||
}
|
||||
|
||||
private readonly bool Initialized;
|
||||
|
||||
public void LoadPKM(PKM pk)
|
||||
{
|
||||
@@ -20,6 +26,8 @@ public void LoadPKM(PKM pk)
|
||||
|
||||
public void TryResetStats()
|
||||
{
|
||||
if (!Initialized || pkm == null)
|
||||
return;
|
||||
if (CHK_Auto.Checked)
|
||||
pkm.ResetCalculatedValues();
|
||||
LoadStoredValues();
|
||||
|
||||
Reference in New Issue
Block a user