From 54aabb00b05f64f4dd2721e0340bdef457c9e06c Mon Sep 17 00:00:00 2001
From: bunnei <bunneidev@gmail.com>
Date: Mon, 26 Oct 2020 16:09:15 -0700
Subject: [PATCH] core: cpu_manager: Add missing call to
 MicroProfileOnThreadExit().

- Fixes an occasional crash when trying to launch subsequent games.
---
 src/core/cpu_manager.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp
index 688b99ebad..983210197a 100644
--- a/src/core/cpu_manager.cpp
+++ b/src/core/cpu_manager.cpp
@@ -365,6 +365,8 @@ void CpuManager::RunThread(std::size_t core) {
     data.enter_barrier.reset();
     data.exit_barrier.reset();
     data.initialized = false;
+
+    MicroProfileOnThreadExit();
 }
 
 } // namespace Core