From 3e729c13cc70af6fb8fef6e38bd5deba7a8a0d6e Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Thu, 30 May 2019 19:37:18 -0400 Subject: core: Initialize cheats after load to avoid VMManager crash This used to occur due to the VMManager being nullptr at the time cheats were registered (during load, but before it was done). This is bypassed by not accessing the VMManager for offset data until load is complete, --- src/core/core.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/core.cpp') diff --git a/src/core/core.cpp b/src/core/core.cpp index 67ec8d4b9..fc7039421 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -205,6 +205,11 @@ struct System::Impl { gpu_core->Start(); cpu_core_manager.StartThreads(); + // Initialize cheat engine + if (cheat_engine) { + cheat_engine->Initialize(); + } + // All threads are started, begin main process execution, now that we're in the clear. main_process->Run(load_parameters->main_thread_priority, load_parameters->main_thread_stack_size); -- cgit v1.2.3