# HG changeset patch # User Darkvater # Date 1116108205 0 # Node ID f644ae658ec907a8e1cd9559c58c50b65d67d426 # Parent 859858f770c016b2075256849e2e836eb42ee62d (svn r2313) - Fix: [ 1202115 ] Clicking shipslist on bouy asserts GetPlayer(). Bouys and oilrigs don't have owners, so it cannot get the vehicle-list of the station-owner. Just use _current_player diff -r 859858f770c0 -r f644ae658ec9 station_gui.c --- a/station_gui.c Sat May 14 21:55:54 2005 +0000 +++ b/station_gui.c Sat May 14 22:03:25 2005 +0000 @@ -472,27 +472,31 @@ ShowQueryString(st->string_id, STR_3030_RENAME_STATION_LOADING, 31, 180, w->window_class, w->window_number); } break; - case 10: { + case 10: { /* Show a list of scheduled trains to this station */ const Station *st = GetStation(w->window_number); ShowPlayerTrains(st->owner, w->window_number); break; } - case 11: { + case 11: { /* Show a list of scheduled road-vehicles to this station */ const Station *st = GetStation(w->window_number); ShowPlayerRoadVehicles(st->owner, w->window_number); break; } - case 12: { + case 12: { /* Show a list of scheduled aircraft to this station */ const Station *st = GetStation(w->window_number); - ShowPlayerAircraft(st->owner, w->window_number); + /* Since oilrigs have no owners, show the scheduled aircraft of current player */ + PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner; + ShowPlayerAircraft(owner, w->window_number); break; } - case 13: { + case 13: { /* Show a list of scheduled ships to this station */ const Station *st = GetStation(w->window_number); - ShowPlayerShips(st->owner, w->window_number); + /* Since oilrigs/bouys have no owners, show the scheduled ships of current player */ + PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner; + ShowPlayerShips(owner, w->window_number); break; } }