diff --git a/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs b/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs index a8c8fb91af..083eb8c799 100644 --- a/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs +++ b/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs @@ -246,7 +246,10 @@ namespace BizHawk.Client.EmuHawk private void NESNameTableViewer_FormClosed(object sender, FormClosedEventArgs e) { - _ppu.RemoveCallback1(); + if (_ppu != null) + { + _ppu.RemoveCallback1(); + } } private void ScanlineTextbox_TextChanged(object sender, EventArgs e) diff --git a/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs b/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs index 59f9ebeb76..22412f45f6 100644 --- a/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs +++ b/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs @@ -799,7 +799,10 @@ namespace BizHawk.Client.EmuHawk private void NesPPU_FormClosed(object sender, FormClosedEventArgs e) { - _ppu.RemoveCallback2(); + if (_ppu != null) + { + _ppu.RemoveCallback2(); + } } #endregion