From b7ecdc85d8b9dd3dc0de61947a490df2fcbffea4 Mon Sep 17 00:00:00 2001 From: truelight Date: Sat, 26 Aug 2006 17:34:48 +0000 Subject: [PATCH] (svn r6148) -Fix r6146: mostly it is useful to declare a variable in the function you use it (tnx Tron) --- waypoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/waypoint.c b/waypoint.c index 4aeb72040c..4dd2baf73d 100644 --- a/waypoint.c +++ b/waypoint.c @@ -88,7 +88,6 @@ static void RedrawWaypointSign(const Waypoint* wp) /* Update all signs */ void UpdateAllWaypointSigns(void) { - DestinationID dest; Waypoint *wp; FOR_ALL_WAYPOINTS(wp) { @@ -99,6 +98,8 @@ void UpdateAllWaypointSigns(void) /* Internal handler to delete a waypoint */ void DestroyWaypoint(Waypoint *wp) { + DestinationID dest; + dest.waypoint = wp->index; RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, dest);