Skip to content
Snippets Groups Projects
Commit 27cf39dd authored by Hanicef's avatar Hanicef
Browse files

Prevent recursion into quit functions

parent aa8fa149
Branches
No related tags found
2 merge requests!2355fix newer versions of mixerx,!2246Add dedicated server build
...@@ -220,6 +220,8 @@ static boolean framebuffer = false; ...@@ -220,6 +220,8 @@ static boolean framebuffer = false;
static size_t num_exit_funcs; static size_t num_exit_funcs;
static void (*exit_funcs[MAX_EXIT_FUNCS])(void); static void (*exit_funcs[MAX_EXIT_FUNCS])(void);
static boolean is_quitting = false;
#ifdef __linux__ #ifdef __linux__
#define MEMINFO_FILE "/proc/meminfo" #define MEMINFO_FILE "/proc/meminfo"
#define MEMTOTAL "MemTotal:" #define MEMTOTAL "MemTotal:"
...@@ -457,6 +459,10 @@ ticcmd_t *I_BaseTiccmd2(void) ...@@ -457,6 +459,10 @@ ticcmd_t *I_BaseTiccmd2(void)
FUNCNORETURN static void I_QuitStatus(int status) FUNCNORETURN static void I_QuitStatus(int status)
{ {
if (is_quitting)
abort();
is_quitting = true;
M_SaveConfig(NULL); //save game config, cvars.. M_SaveConfig(NULL); //save game config, cvars..
D_SaveBan(); // save the ban list D_SaveBan(); // save the ban list
G_SaveGameData(clientGamedata); // Tails 12-08-2002 G_SaveGameData(clientGamedata); // Tails 12-08-2002
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment