From 176507cb4694c6f8a977d2eee69909234ddcd583 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sat, 23 Jun 2018 01:18:35 +0200 Subject: [PATCH] Fix memory corruption on console reset. --- src/emucore/Console.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 0739588c7..532f9f9e5 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -206,6 +206,10 @@ Console::~Console() // Some smart controllers need to be informed that the console is going away myLeftControl->close(); myRightControl->close(); + + // Close audio to prevent invalid access to myConsoleTiming from the audio + // callback + myOSystem.sound().close(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -