foxygit / fake-08-xbox360 Log in
commit 3b92a8385d24fd0005c0944ace9f504757e02c99
Author:     jtothebell <j.to.the.bell@gmail.com>
AuthorDate: Sat Jan 8 18:27:21 2022 -0700
Commit:     jtothebell <j.to.the.bell@gmail.com>
CommitDate: Sat Jan 8 18:27:21 2022 -0700

    call host cleanup before deleting vm

    It looks like the old order was creating a race condition with the SDL
    audio callback, that would manifest as a crash on the bittboy
---
 source/main.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/source/main.cpp b/source/main.cpp
index eb4164f..636caca 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -67,11 +67,12 @@ int main(int argc, char* argv[])

 	Logger_Write("Turning off vm and exiting logger\n");
 	vm->CloseCart();
-	Logger_Write("deleting vm\n");
-	delete vm;

 	Logger_Write("calling one time cleanup\n");
 	host->oneTimeCleanup();
+
+	Logger_Write("deleting vm\n");
+	delete vm;
 	Logger_Write("deleting host\n");
 	delete host;