Fix programmable signal programs not being cleared in InitializeGame.

This could leave dangling signal programs in subsequent games
which can cause crashes during saving.
This commit is contained in:
Jonathan G Rennison
2015-10-01 20:56:38 +01:00
parent fc0efe599e
commit ad4f4525f3

View File

@@ -28,6 +28,7 @@
#include "core/pool_type.hpp" #include "core/pool_type.hpp"
#include "game/game.hpp" #include "game/game.hpp"
#include "linkgraph/linkgraphschedule.h" #include "linkgraph/linkgraphschedule.h"
#include "programmable_signals.h"
#include "safeguards.h" #include "safeguards.h"
@@ -74,6 +75,9 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin
LinkGraphSchedule::Clear(); LinkGraphSchedule::Clear();
PoolBase::Clean(PT_NORMAL); PoolBase::Clean(PT_NORMAL);
FreeSignalPrograms();
FreeSignalDependencies();
ResetPersistentNewGRFData(); ResetPersistentNewGRFData();
InitializeSound(); InitializeSound();