diff --git a/r5dev/windows/system.cpp b/r5dev/windows/system.cpp index 26aeddf8..705a0850 100644 --- a/r5dev/windows/system.cpp +++ b/r5dev/windows/system.cpp @@ -97,7 +97,12 @@ void WinSys_Attach() //DetourAttach(&(LPVOID&)VPeekMessageW, (PBYTE)HPeekMessage); /////////////////////////////////////////////////////////////////////////// - DetourTransactionCommit(); + HRESULT hr = DetourTransactionCommit(); + if (hr != NO_ERROR) + { + // Failed to hook into the process, terminate + Error(eDLL_T::COMMON, 0xBAD0C0DE, "Failed to detour process: error code = %08x\n", hr); + } #endif // DEDICATED }