summaryrefslogtreecommitdiff
path: root/src/saveload/station_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/station_sl.cpp')
-rw-r--r--src/saveload/station_sl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp
index 330425024..e41cb3288 100644
--- a/src/saveload/station_sl.cpp
+++ b/src/saveload/station_sl.cpp
@@ -75,6 +75,9 @@ void MoveBuoysToWaypoints()
/* Delete the station, so we can make it a real waypoint. */
delete st;
+ /* Stations and waypoints are in the same pool, so if a station
+ * is deleted there must be place for a Waypoint. */
+ assert(Waypoint::CanAllocateItem());
Waypoint *wp = new (index) Waypoint(xy);
wp->town = town;
wp->string_id = train ? STR_SV_STNAME_WAYPOINT : STR_SV_STNAME_BUOY;