diff --git a/External/FEXCore/Source/Interface/Core/Core.cpp b/External/FEXCore/Source/Interface/Core/Core.cpp index cb775307d..2ad175a5e 100644 --- a/External/FEXCore/Source/Interface/Core/Core.cpp +++ b/External/FEXCore/Source/Interface/Core/Core.cpp @@ -308,7 +308,9 @@ namespace FEXCore::Context { StopGdbServer(); } +#ifndef _WIN32 ThunkHandler = FEXCore::ThunkHandler::Create(); +#endif using namespace FEXCore::Core; @@ -556,7 +558,9 @@ namespace FEXCore::Context { Thread->ThreadManager.TID = FHU::Syscalls::gettid(); Thread->ThreadManager.PID = ::getpid(); SignalDelegation->RegisterTLSState(Thread); - ThunkHandler->RegisterTLSState(Thread); + if (ThunkHandler) { + ThunkHandler->RegisterTLSState(Thread); + } } void ContextImpl::RunThread(FEXCore::Core::InternalThreadState *Thread) { @@ -1361,7 +1365,9 @@ namespace FEXCore::Context { } void ContextImpl::AppendThunkDefinitions(fextl::vector const& Definitions) { - ThunkHandler->AppendThunkDefinitions(Definitions); + if (ThunkHandler) { + ThunkHandler->AppendThunkDefinitions(Definitions); + } } void ContextImpl::ConfigureAOTGen(FEXCore::Core::InternalThreadState *Thread, fextl::set *ExternalBranches, uint64_t SectionMaxAddress) {