(svn r14145) -Fix (r14135, r14141): When savegame conversion cannot determine a owner of a greyed waypoint, ensure that the owner is assigned when the waypoint is rebuild.
authorfrosch
Sat, 23 Aug 2008 19:14:27 +0000
changeset 9988 e1d691017fee
parent 9987 ee1e22594629
child 9989 62e68bd41c90
(svn r14145) -Fix (r14135, r14141): When savegame conversion cannot determine a owner of a greyed waypoint, ensure that the owner is assigned when the waypoint is rebuild.
src/waypoint.cpp
--- a/src/waypoint.cpp	Sat Aug 23 18:05:52 2008 +0000
+++ b/src/waypoint.cpp	Sat Aug 23 19:14:27 2008 +0000
@@ -231,7 +231,6 @@
 			wp->town_index = INVALID_TOWN;
 			wp->name = NULL;
 			wp->town_cn = 0;
-			wp->owner = owner;
 		} else {
 			/* Move existing (recently deleted) waypoint to the new location */
 
@@ -251,6 +250,7 @@
 			wp->xy = tile;
 			InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index);
 		}
+		wp->owner = owner;
 
 		const StationSpec* statspec;