mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 01:49:10 +00:00
(svn r16375) -Codechange: don't be afraid of deleting NULL pointers
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user