Changeset - r16055:f2d805b29aac
[Not reviewed]
master
0 3 0
smatz - 14 years ago 2010-09-06 18:20:07
smatz@openttd.org
(svn r20758) -Fix: when leaving the program, current newgrf config would leak, causing valgrind warnings
3 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -6984,7 +6984,7 @@ static void ResetNewGRFErrors()
 
 * Reset all NewGRF loaded data
 
 * TODO
 
 */
 
static void ResetNewGRFData()
 
void ResetNewGRFData()
 
{
 
	CleanUpStrings();
 
	CleanUpGRFTownNames();
src/newgrf.h
Show inline comments
 
@@ -159,6 +159,7 @@ extern GRFLoadedFeatures _loaded_newgrf_
 
void LoadNewGRFFile(struct GRFConfig *config, uint file_index, GrfLoadingStage stage);
 
void LoadNewGRF(uint load_index, uint file_index);
 
void ReloadNewGRFData(); // in saveload/afterload.cpp
 
void ResetNewGRFData();
 

	
 
void CDECL grfmsg(int severity, const char *str, ...) WARN_FORMAT(2, 3);
 

	
src/openttd.cpp
Show inline comments
 
@@ -59,6 +59,7 @@
 
#include "rail_gui.h"
 
#include "core/backup_type.hpp"
 
#include "hotkeys.h"
 
#include "newgrf.h"
 

	
 

	
 
#include "town.h"
 
@@ -347,6 +348,8 @@ static void ShutdownGame()
 
	free(_config_file);
 
#endif
 

	
 
	ResetNewGRFData();
 

	
 
	/* Close all and any open filehandles */
 
	FioCloseAll();
 
}
0 comments (0 inline, 0 general)