Skip to content

Commit fd9461f

Browse files
committed
fix(crashreporter): Not exiting
1 parent 635b2ac commit fd9461f

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

src/crashreporter/CrashReport.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#ifdef _WIN32
44
bool BeginCrashListener() { return true; }
5-
void CrashReporterListener() {}
65
#else
76

87
#include <rapidjson/document.h>
@@ -20,7 +19,6 @@ void CrashReporterListener() {}
2019
#include <sstream>
2120

2221
#include <random>
23-
#include <atomic>
2422

2523
#include "../files/Files.h"
2624
#include "../common.h"
@@ -30,8 +28,6 @@ std::string startup_cmd = "None";
3028

3129
const char *ws = " \t\n\r\f\v";
3230

33-
std::atomic<bool> exitProgram(false);
34-
3531
// trim from end of string (right)
3632
inline std::string &rtrim(std::string &s, const char *t = ws)
3733
{
@@ -165,7 +161,7 @@ void signal_handler(int signumber)
165161
PLUGIN_PRINTF("Crash Reporter", "Error crash handling: %s\n", e.what());
166162
}
167163

168-
exitProgram = true;
164+
exit(EXIT_FAILURE);
169165
}
170166

171167
bool BeginCrashListener()
@@ -200,10 +196,4 @@ bool BeginCrashListener()
200196
return true;
201197
}
202198

203-
void CrashReporterListener()
204-
{
205-
if (exitProgram.load())
206-
exit(EXIT_FAILURE);
207-
}
208-
209199
#endif

src/entrypoint.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ GameFrameMsgPackCache gameFrameCache = {
350350
false,
351351
};
352352

353-
void CrashReporterListener();
354-
355353
void Swiftly::Hook_GameFrame(bool simulating, bool bFirstTick, bool bLastTick)
356354
{
357355
PERF_RECORD("GameFrame", "core")
@@ -370,12 +368,6 @@ void Swiftly::Hook_GameFrame(bool simulating, bool bFirstTick, bool bLastTick)
370368
g_flNextUpdate = curtime + 5.0;
371369
}
372370

373-
//////////////////////////////////////////////////////////////
374-
///////////////// Crash Reporter //////////////
375-
////////////////////////////////////////////////////////////
376-
377-
CrashReporterListener();
378-
379371
//////////////////////////////////////////////////////////////
380372
///////////////// Game Event //////////////
381373
////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)