summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-22 13:13:55 +0000
committersmatz <smatz@openttd.org>2009-05-22 13:13:55 +0000
commit561d97880d3c2be7d8160f67d18d3e3b85c284e6 (patch)
tree3dc35273727a3e324134794ac62351ebaf9eba8d /src
parentb37fda664c89a17fc739de2cb69b09e904100851 (diff)
downloadopenttd-561d97880d3c2be7d8160f67d18d3e3b85c284e6.tar.xz
(svn r16375) -Codechange: don't be afraid of deleting NULL pointers
Diffstat (limited to 'src')
-rw-r--r--src/bridge_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index 7f7c531dd..8f5a39e2b 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -366,7 +366,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
if (bl != NULL && bl->Length() != 0) {
new BuildBridgeWindow(&_build_bridge_desc, start, end, type, bl);
} else {
- if (bl != NULL) delete bl;
+ delete bl;
ShowErrorMessage(errmsg, STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, TileX(end) * TILE_SIZE, TileY(end) * TILE_SIZE);
}
}