summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortron <tron@openttd.org>2007-02-02 19:07:20 +0000
committertron <tron@openttd.org>2007-02-02 19:07:20 +0000
commite0a46a08e97412c22eea71d77983ca2fdf695320 (patch)
tree4e69634f2286d66d4885d9cb8287c0b3da670e0c /src
parent8baecb778dd4c9e5aacbd71f2c383c1dc0256915 (diff)
downloadopenttd-e0a46a08e97412c22eea71d77983ca2fdf695320.tar.xz
(svn r8538) -Fix
GetRoadStopByTile() cannot return NULL. Remove therefore unnecessary check
Diffstat (limited to 'src')
-rw-r--r--src/roadveh_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index dc37bdf92..6be3e106d 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1080,8 +1080,8 @@ static int RoadFindPathToDest(Vehicle* v, TileIndex tile, DiagDirection enterdir
bitmask = 0;
} else {
// proper station type, check if there is free loading bay
- const RoadStop *rs = GetRoadStopByTile(tile, rstype);
- if (rs == NULL || (!_patches.roadveh_queue && GB(rs->status, 0, 2) == 0)) {
+ if (!_patches.roadveh_queue &&
+ GB(GetRoadStopByTile(tile, rstype)->status, 0, 2) == 0) {
// station is full and RV queuing is off
bitmask = 0;
}