From bdf6a58e2c8e87863f6308e4fa23aa6f1d58ff01 Mon Sep 17 00:00:00 2001 From: goyuken Date: Wed, 31 Dec 2014 17:43:40 +0000 Subject: [PATCH] fix NES NT\PPU view for previous revision --- BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs | 5 ++++- BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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