summaryrefslogtreecommitdiff
path: root/src/saveload/waypoint_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/waypoint_sl.cpp')
-rw-r--r--src/saveload/waypoint_sl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp
index 3dce9e3d5..9d1f164b4 100644
--- a/src/saveload/waypoint_sl.cpp
+++ b/src/saveload/waypoint_sl.cpp
@@ -93,6 +93,8 @@ void MoveWaypointsToBaseStations()
}
}
+ if (!Waypoint::CanAllocateItem(_old_waypoints.Length())) SlError(STR_ERROR_TOO_MANY_STATIONS_LOADING);
+
/* All saveload conversions have been done. Create the new waypoints! */
for (OldWaypoint *wp = _old_waypoints.Begin(); wp != _old_waypoints.End(); wp++) {
Waypoint *new_wp = new Waypoint(wp->xy);