mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Prevent recursion into quit functions
This commit is contained in:
parent
aa8fa149a7
commit
27cf39dd54
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||||
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue