diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 8d92bf722..680233dea 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -1444,7 +1444,6 @@ void I_Quit(void) if (myargmalloc) free(myargv); // Deallocate allocated memory - W_Shutdown(); exit(0); } @@ -1522,7 +1521,6 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...) "SRB2Kart V2 " VERSIONSTRING " Recursive Error", buffer, NULL); - W_Shutdown(); exit(-1); // recursive errors detected } } @@ -1570,8 +1568,6 @@ FUNCIERROR void ATTRNORETURN I_Error(const char *error, ...) I_ShutdownSystem(); SDL_Quit(); - W_Shutdown(); - #if defined (PARANOIA) || defined (DEVELOP) *(volatile INT32 *)0 = 4; //Alam: Debug! #endif diff --git a/src/w_wad.c b/src/w_wad.c index e9a667ffe..06b64e18b 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -125,7 +125,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 c6b8ef164..7d5162b41 100644 --- a/src/w_wad.h +++ b/src/w_wad.h @@ -152,8 +152,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