Skip to content

Commit b973269

Browse files
committed
InitializeDbgHelp() before calling BuildCrashInfoText()
1 parent c5a73f5 commit b973269

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/CrashHandler.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,6 @@ void _uploadDebugReport(const char* condStr, bool isCrash, bool captureCallstack
389389
loga("_uploadDebugReport\n");
390390
}
391391

392-
auto s = BuildCrashInfoText(condStr, isCrash, captureCallstack);
393-
if (str::IsEmpty(s)) {
394-
loga("_uploadDebugReport(): skipping because !BuildCrashInfoText()\n");
395-
return;
396-
}
397-
ByteSlice d(s);
398-
SaveCrashInfo(d);
399-
400392
bool shouldUpload = true;
401393
if (gIsDebugBuild || gIsAsanBuild) shouldUpload = false;
402394
if (gIsStoreBuild && !isCrash) shouldUpload = false;
@@ -455,6 +447,14 @@ void _uploadDebugReport(const char* condStr, bool isCrash, bool captureCallstack
455447
DownloadSymbolsIfNeeded();
456448
}
457449

450+
auto s = BuildCrashInfoText(condStr, isCrash, captureCallstack);
451+
if (str::IsEmpty(s)) {
452+
loga("_uploadDebugReport(): skipping because !BuildCrashInfoText()\n");
453+
return;
454+
}
455+
ByteSlice d(s);
456+
SaveCrashInfo(d);
457+
458458
UploadCrashReport(d);
459459
// gCrashHandlerAllocator->Free((const void*)d.data());
460460
loga(s);

0 commit comments

Comments
 (0)