mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Fix windows SEH hook when crashing in an std::thread
Follows 107d3d461f and other 'pthread->std::thread' diffs.
Windows uses Structured Exception Handling to allow reporting errors
(both C++ and hardware) nicely. This works by wrapping the code in a
__try __catch block.
The pthread wrapper did this automatically, but we now need to do it
explicitly for std::thread.
Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3261
This was SVN commit r24530.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -254,7 +254,7 @@ void CProfiler2::Shutdown()
|
||||
|
||||
// the destructor is not called for the main thread
|
||||
// we have to call it manually to avoid memory leaks
|
||||
ENSURE(ThreadUtil::IsMainThread());
|
||||
ENSURE(Threading::IsMainThread());
|
||||
m_Initialised = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user