mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 10:26:31 +02:00
Don't use unique_ptr to store CrashpadClient
This commit is contained in:
parent
5ab16302ca
commit
250806252e
1 changed files with 7 additions and 5 deletions
|
@ -39,16 +39,17 @@ static const std::string BACKTRACE_TOKEN { CMAKE_BACKTRACE_TOKEN };
|
|||
|
||||
extern QString qAppFileName();
|
||||
|
||||
CrashpadClient* client { nullptr };
|
||||
std::mutex annotationMutex;
|
||||
crashpad::SimpleStringDictionary* crashpadAnnotations { nullptr };
|
||||
|
||||
|
||||
std::unique_ptr<CrashpadClient> client;
|
||||
|
||||
LONG WINAPI vectoredExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo) {
|
||||
if (!client) {
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
if (pExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_HEAP_CORRUPTION ||
|
||||
pExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_STACK_BUFFER_OVERRUN) {
|
||||
assert(client);
|
||||
client->DumpAndCrash(pExceptionInfo);
|
||||
}
|
||||
|
||||
|
@ -60,7 +61,8 @@ bool startCrashHandler() {
|
|||
return false;
|
||||
}
|
||||
|
||||
client.reset(new CrashpadClient());
|
||||
assert(!client);
|
||||
client = new CrashpadClient();
|
||||
std::vector<std::string> arguments;
|
||||
|
||||
std::map<std::string, std::string> annotations;
|
||||
|
|
Loading…
Reference in a new issue