From 29d6531a50d8e216633aaba131a4a9ca4f76ae06 Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Mon, 16 Dec 2024 07:29:30 -0800 Subject: [PATCH] Rearrange ShutdownGame() to prevent network based crash This prevents a crash that occurs when trying to exit the game while a connection attempt is being made (such as closing the game while it's in the middle of trying to connect to GrooveStats). --- src/StepMania.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StepMania.cpp b/src/StepMania.cpp index e1640b8cb9..32da63693a 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -298,10 +298,10 @@ void ShutdownGame() LIGHTSMAN->TurnOffAllLights(); } + RageUtil::SafeDelete( NETWORK ); RageUtil::SafeDelete( SCREENMAN ); RageUtil::SafeDelete( STATSMAN ); RageUtil::SafeDelete( MESSAGEMAN ); - RageUtil::SafeDelete( NETWORK ); /* Delete INPUTMAN before the other INPUTFILTER handlers, or an input * driver may try to send a message to INPUTFILTER after we delete it. */ RageUtil::SafeDelete( INPUTMAN );