From bd3331df4f0d3dc89214d92693018d15e759d2b5 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 16 Jul 2016 14:34:10 +0100 Subject: [PATCH] call assert() if not using breakpad --- src/core/Guard.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/Guard.cpp b/src/core/Guard.cpp index 1e2e336dfc..0179caf63d 100644 --- a/src/core/Guard.cpp +++ b/src/core/Guard.cpp @@ -48,10 +48,10 @@ namespace Guard Console::Error::WriteLine_VA(message, args); } -#if DEBUG +#ifdef DEBUG Debug::Break(); #endif -#if __WINDOWS__ +#ifdef __WINDOWS__ char version[128]; openrct2_write_full_version_info(version, sizeof(version)); @@ -63,8 +63,12 @@ namespace Guard int result = MessageBox(nullptr, buffer, OPENRCT2_NAME, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION); if (result == IDABORT) { +#ifdef USE_BREAKPAD // Force a crash that breakpad will handle allowing us to get a dump *((void**)0) = 0; +#else + assert(false); +#endif } #else assert(false);