forked from Mirrors/openclonk
Win: Don't write a text crash dump if the log is already closed
Assertion failures or crashes during process shutdown must not write to the log file if it is already closed, or the debugging CRT will raise another assertion.issue1247
parent
c809ab4ae3
commit
04df02c9df
|
@ -429,7 +429,8 @@ LONG WINAPI GenerateDump(EXCEPTION_POINTERS* pExceptionPointers)
|
|||
}
|
||||
|
||||
// Write dump (human readable format)
|
||||
SafeTextDump(pExceptionPointers, GetLogFD(), filename);
|
||||
if (GetLogFD() != -1)
|
||||
SafeTextDump(pExceptionPointers, GetLogFD(), filename);
|
||||
|
||||
if (file != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -569,7 +570,8 @@ namespace {
|
|||
eptr.ExceptionRecord = &erec;
|
||||
|
||||
// Log
|
||||
SafeTextDump(&eptr, GetLogFD(), nullptr);
|
||||
if (GetLogFD() != -1)
|
||||
SafeTextDump(&eptr, GetLogFD(), nullptr);
|
||||
|
||||
// Continue caller
|
||||
if (ResumeThread(data->thread) == -1)
|
||||
|
|
Loading…
Reference in New Issue