diff --git a/src/dedicated/i_system.c b/src/dedicated/i_system.c index f99443b05..d8b8de220 100644 --- a/src/dedicated/i_system.c +++ b/src/dedicated/i_system.c @@ -1464,7 +1464,6 @@ void I_Quit(void) free(myargv); // Deallocate allocated memory death: - W_Shutdown(); exit(0); } @@ -1510,7 +1509,6 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...) I_OutputMsg("SRB2Kart %s Recursive Error", buffer); - W_Shutdown(); exit(-1); // recursive errors detected } } @@ -1545,8 +1543,6 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...) I_ShutdownGraphics(); I_ShutdownSystem(); - W_Shutdown(); - #if defined (PARANOIA) && defined (__CYGWIN__) *(INT32 *)2 = 4; //Alam: Debug! #endif diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 0511f17c8..152e1f19d 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -2025,7 +2025,6 @@ FUNCNORETURN void ATTRNORETURN I_Quit(void) if (myargmalloc) free(myargv); // Deallocate allocated memory - W_Shutdown(); exit(0); } @@ -2085,7 +2084,6 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...) sigttl = "SRB2Kart " VERSIONSTRING " Recursive Error"; I_ShowSimpleErrorBox(sigttl, buffer); - W_Shutdown(); exit(-1); // recursive errors detected } } @@ -2127,8 +2125,6 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...) //I_ShowSimpleErrorBox(sigttl, buffer); I_ShowErrorBox(sigttl, buffer); - W_Shutdown(); - #if defined (PARANOIA) && defined (__CYGWIN__) *(INT32 *)2 = 4; //Alam: Debug! #endif diff --git a/src/w_wad.c b/src/w_wad.c index 53b0ed65b..1099667e0 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -128,7 +128,7 @@ wadfile_t *wadfiles[MAX_WADFILES] = {}; // 0 to numwadfiles-1 are valid // If not done on a Mac then open wad files // can prevent removable media they are on from // being ejected -void W_Shutdown(void) +DESTRUCTOR static void W_Shutdown(void) { lumpnum_map_cleanup(&lumpnumcache); diff --git a/src/w_wad.h b/src/w_wad.h index 474f72c23..a17023821 100644 --- a/src/w_wad.h +++ b/src/w_wad.h @@ -154,8 +154,6 @@ extern wadfile_t *wadfiles[MAX_WADFILES]; // ========================================================================= -void W_Shutdown(void); - // Opens a WAD file. Returns the FILE * handle for the file, or NULL if not found or could not be opened FILE *W_OpenWadFile(const char **filename, boolean useerrors); // Load and add a wadfile to the active wad files, returns numbers of lumps, INT16_MAX on error