From 4f569fd568590b43cd8d924a6abf3c13632a098a Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Mon, 25 Dec 2023 13:50:22 +0100 Subject: assert/logging: Stop the logging thread and flush the backends before crashing Co-Authored-By: SachinVin <26602104+SachinVin@users.noreply.github.com> --- src/common/assert.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common/assert.cpp') diff --git a/src/common/assert.cpp b/src/common/assert.cpp index 6026b7dc2..e2c2cade3 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp @@ -3,16 +3,19 @@ #include "common/assert.h" #include "common/common_funcs.h" +#include "common/logging/backend.h" #include "common/settings.h" void assert_fail_impl() { if (Settings::values.use_debug_asserts) { + Common::Log::Stop(); Crash(); } } [[noreturn]] void unreachable_impl() { + Common::Log::Stop(); Crash(); throw std::runtime_error("Unreachable code"); } -- cgit v1.2.3