(svn r10405) -Fix [FS#972]: do not try to determine the default railtype in the scenario editor.
authorrubidium
Sun, 01 Jul 2007 17:11:24 +0000
changeset 7627 17d48c4a22ca
parent 7626 baab18f2a00c
child 7628 8ec5bb2fe24d
(svn r10405) -Fix [FS#972]: do not try to determine the default railtype in the scenario editor.
src/rail_gui.cpp
--- a/src/rail_gui.cpp	Sun Jul 01 12:25:08 2007 +0000
+++ b/src/rail_gui.cpp	Sun Jul 01 17:11:24 2007 +0000
@@ -1231,7 +1231,7 @@
 
 void SetDefaultRailGui()
 {
-	if (_local_player == PLAYER_SPECTATOR) return;
+	if (_local_player == PLAYER_SPECTATOR || !IsValidPlayer(_local_player)) return;
 
 	extern RailType _last_built_railtype;
 	RailType rt = (RailType)_patches.default_rail_type;