From 129d454a676c7db6a4394812607b022ad2a0b4fe Mon Sep 17 00:00:00 2001 From: nattthebear Date: Fri, 19 Jun 2020 20:37:07 -0400 Subject: [PATCH] blah blah dispose blah blah --- .../Consoles/Nintendo/NDS/MelonDS.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs index 4650538163..433d1b0a4e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs @@ -23,9 +23,15 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS internal CoreComm CoreComm { get; } + private bool _disposed; public void Dispose() { - Deinit(); + if (!_disposed) + { + Deinit(); + _resampler.Dispose(); + _disposed = true; + } } public bool FrameAdvance(IController controller, bool render, bool renderSound = true)