mirror of https://github.com/OpenTTD/OpenTTD
(svn r7726) -Fix (r7622, FS#497): segmentation fault on pressing the 'sell all airplanes'.
parent
00156e1094
commit
2da5a339eb
|
@ -779,11 +779,11 @@ static void DepotWndProc(Window *w, WindowEvent *e)
|
||||||
STR_A002_AIRCRAFT_HANGAR
|
STR_A002_AIRCRAFT_HANGAR
|
||||||
};
|
};
|
||||||
TileIndex tile = w->window_number;
|
TileIndex tile = w->window_number;
|
||||||
byte vehtype = WP(w, depot_d).type - VEH_Train;
|
byte vehtype = WP(w, depot_d).type;
|
||||||
|
|
||||||
SetDParam(0, (vehtype == VEH_Aircraft) ? GetStationIndex(tile) : GetDepotByTile(tile)->town_index);
|
SetDParam(0, (vehtype == VEH_Aircraft) ? GetStationIndex(tile) : GetDepotByTile(tile)->town_index);
|
||||||
ShowQuery(
|
ShowQuery(
|
||||||
confirm_captions[vehtype],
|
confirm_captions[vehtype - VEH_Train],
|
||||||
STR_DEPOT_SELL_CONFIRMATION_TEXT,
|
STR_DEPOT_SELL_CONFIRMATION_TEXT,
|
||||||
w,
|
w,
|
||||||
DepotSellAllConfirmationCallback
|
DepotSellAllConfirmationCallback
|
||||||
|
|
Loading…
Reference in New Issue