# HG changeset patch # User alberth # Date 2010-03-05 21:34:12 # Node ID 03625b46a3994a90626e7d6d85c2ee71de92b28d # Parent f3e02434b6fb6da2e3c5d60e5876e7d9f4fcc177 (svn r19320) -Fix (r19291): Forgot to set error message. diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1478,8 +1478,11 @@ CommandCost CmdConvertRail(TileIndex til TileY(endtile) >= sy && TileY(endtile) <= ey) continue; /* When not coverting rail <-> el. rail, any vehicle cannot be in tunnel/bridge */ - if (!IsCompatibleRail(GetRailType(tile), totype) && - TunnelBridgeIsFree(tile, endtile).Failed()) continue; + if (!IsCompatibleRail(GetRailType(tile), totype)) { + CommandCost ret = TunnelBridgeIsFree(tile, endtile); + ret.SetGlobalErrorMessage(); + if (ret.Failed()) continue; + } if (flags & DC_EXEC) { Track track = DiagDirToDiagTrack(GetTunnelBridgeDirection(tile));