(svn r10830) [NewGRF_ports] -Fix: Only test and draw a preview picture if the fsmportspec can be accessed.
--- a/src/airport_gui.cpp Thu Aug 09 02:43:04 2007 +0000
+++ b/src/airport_gui.cpp Thu Aug 09 02:45:42 2007 +0000
@@ -221,14 +221,13 @@
SetDParam(0, GetFSMportsClassName(_airport.fsmports_class));
DrawWindowWidgets(w);
- /* only draw the preview image if the station is available */
- if (!HASBIT(fsmportspec->callbackmask, CBM_STATION_AVAIL) || GetFSMportsCallback(CBID_STATION_AVAILABILITY, 0, 0, fsmportspec, NULL, INVALID_TILE) != 0) {
- DrawFSMportsTile(9, 106, preview_sprite, _airport.fsmports_class, _airport.station_type);
- }
-
// strings such as 'Size' and 'Coverage Area'
// 'Coverage Area'
if (_airport.station_type != 0xFF) {
+ /* only draw the preview image if the station is available */
+ if (!HASBIT(fsmportspec->callbackmask, CBM_STATION_AVAIL) || GetFSMportsCallback(CBID_STATION_AVAILABILITY, 0, 0, fsmportspec, NULL, INVALID_TILE) != 0) {
+ DrawFSMportsTile(9, 106, preview_sprite, _airport.fsmports_class, _airport.station_type);
+ }
int rad = _patches.modified_catchment ? fsmportspec->portFSM->catchment : 4;
if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
DrawStationCoverageAreaText(2, 206, SCT_ALL, rad);