From 0dbd400c12426e7809b2750b3138f8eb92a8a939 Mon Sep 17 00:00:00 2001 From: mittorn Date: Fri, 1 Dec 2023 07:03:23 +0300 Subject: [PATCH] crashhandler: set host.crashed before messagebox to allow platform code handle crashed state in different way --- engine/common/crashhandler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/common/crashhandler.c b/engine/common/crashhandler.c index 4ae42ab0..581207a9 100644 --- a/engine/common/crashhandler.c +++ b/engine/common/crashhandler.c @@ -490,13 +490,14 @@ static void Sys_Crash( int signal, siginfo_t *si, void *context) #ifdef XASH_SDL SDL_SetWindowGrab( host.hWnd, SDL_FALSE ); #endif + host.crashed = true; MSGBOX( message ); // log saved, now we can try to save configs and close log correctly, it may crash if( host.type == HOST_NORMAL ) CL_Crashed(); host.status = HOST_CRASHED; - host.crashed = true; + Sys_Quit(); }