Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2013-05-17 22:43:40 +0400
committerUnderground78 <underground78@users.sourceforge.net>2013-05-18 11:03:45 +0400
commitbfd7f7e11148961514768ec9d149965d17a77026 (patch)
treebddf10f6192df09d5852e0f0e410219b7eeba532 /src
parenta4ef88b02460cfc9637834501d292c36acafd752 (diff)
MiniDump: Make a test more explicit.
Diffstat (limited to 'src')
-rw-r--r--src/mpc-hc/MiniDump.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mpc-hc/MiniDump.cpp b/src/mpc-hc/MiniDump.cpp
index 5444b3402..b9c988aed 100644
--- a/src/mpc-hc/MiniDump.cpp
+++ b/src/mpc-hc/MiniDump.cpp
@@ -92,6 +92,7 @@ BOOL CMiniDump::PreventSetUnhandledExceptionFilter()
LONG WINAPI CMiniDump::UnhandledExceptionFilter(_EXCEPTION_POINTERS* lpTopLevelExceptionFilter)
{
LONG retval = EXCEPTION_CONTINUE_SEARCH;
+ BOOL bDumpCreated = FALSE;
HMODULE hDll = nullptr;
TCHAR szResult[800];
szResult[0] = _T('\0');
@@ -135,8 +136,8 @@ LONG WINAPI CMiniDump::UnhandledExceptionFilter(_EXCEPTION_POINTERS* lpTopLevelE
ExInfo.ClientPointers = FALSE;
// write the dump
- BOOL bOK = pMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, MiniDumpNormal, &ExInfo, nullptr, nullptr);
- if (bOK) {
+ bDumpCreated = pMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, MiniDumpNormal, &ExInfo, nullptr, nullptr);
+ if (bDumpCreated) {
_stprintf_s(szResult, _countof(szResult), ResStr(IDS_MPC_CRASH), strDumpPath);
retval = EXCEPTION_EXECUTE_HANDLER;
} else {
@@ -152,7 +153,7 @@ LONG WINAPI CMiniDump::UnhandledExceptionFilter(_EXCEPTION_POINTERS* lpTopLevelE
}
if (szResult[0]) {
- switch (MessageBox(nullptr, szResult, _T("MPC-HC - Mini Dump"), retval ? MB_YESNO : MB_OK)) {
+ switch (MessageBox(nullptr, szResult, _T("MPC-HC - Mini Dump"), bDumpCreated ? MB_YESNO : MB_OK)) {
case IDYES:
ShellExecute(nullptr, _T("open"), BUGS_URL, nullptr, nullptr, SW_SHOWDEFAULT);
ExploreToFile(strDumpPath);