From 9f540ccdc9069c9e63a3c8eaa42961b442aad209 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 20 Dec 2013 22:17:44 +0100 Subject: [PATCH] Do not load or even try to load the crash report dll under WOW64 Based on TortoiseSVN rev. 24447. Signed-off-by: Sven Strickroth --- src/Utils/CrashReport.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Utils/CrashReport.h b/src/Utils/CrashReport.h index 294939da9..26c042afe 100644 --- a/src/Utils/CrashReport.h +++ b/src/Utils/CrashReport.h @@ -200,7 +200,11 @@ private: // hCrshhndlDll should not be unloaded, crash may appear even after return from main(). // So hCrshhndlDll is not saved after construction. - HMODULE hCrshhndlDll = ::LoadLibraryW(L"crshhndl.dll"); + BOOL bIsWow = FALSE; + IsWow64Process(GetCurrentProcess(), &bIsWow); + HMODULE hCrshhndlDll = nullptr; + if (bIsWow == FALSE) + hCrshhndlDll = ::LoadLibraryW(L"crshhndl.dll"); if (hCrshhndlDll != NULL) { m_InitCrashHandler = (pfnInitCrashHandler) GetProcAddress(hCrshhndlDll, "InitCrashHandler"); -- 2.11.4.GIT