mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
fix use before init
This commit is contained in:
parent
76a2e4f527
commit
08f13cb3a1
1 changed files with 9 additions and 1 deletions
|
@ -8,7 +8,13 @@ namespace PKHeX.WinForms.Controls
|
|||
{
|
||||
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 @@ namespace PKHeX.WinForms.Controls
|
|||
|
||||
public void TryResetStats()
|
||||
{
|
||||
if (!Initialized || pkm == null)
|
||||
return;
|
||||
if (CHK_Auto.Checked)
|
||||
pkm.ResetCalculatedValues();
|
||||
LoadStoredValues();
|
||||
|
|
Loading…
Reference in a new issue