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 "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();
|
||||||
|
Reference in New Issue
Block a user