changeset 11969:d89c33df9b66 draft

(svn r16375) -Codechange: don't be afraid of deleting NULL pointers
author smatz <smatz@openttd.org>
date Fri, 22 May 2009 13:13:55 +0000
parents 3a1043b2e1f9
children 2286db6ac0bb
files src/bridge_gui.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -366,7 +366,7 @@
 	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);
 	}
 }