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:
@@ -28,6 +28,7 @@
|
||||
#include "core/pool_type.hpp"
|
||||
#include "game/game.hpp"
|
||||
#include "linkgraph/linkgraphschedule.h"
|
||||
#include "programmable_signals.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -74,6 +75,9 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin
|
||||
LinkGraphSchedule::Clear();
|
||||
PoolBase::Clean(PT_NORMAL);
|
||||
|
||||
FreeSignalPrograms();
|
||||
FreeSignalDependencies();
|
||||
|
||||
ResetPersistentNewGRFData();
|
||||
|
||||
InitializeSound();
|
||||
|
Reference in New Issue
Block a user