1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-27 14:14:27 +01:00

(svn r16481) [0.7] -Backport from trunk:

- Fix: [NoAI] Another try/catch related bug (r16454)
- Fix: Road vehicles ending up on the pavement when they are in a drive through station that got removed due to bankruptcy [FS#2909] (r16448)
- Fix: [NoAI] AIRail::GetRailStationDirection returned incorrect information (r16440)
- Fix: Crash when a company is deleted while a dropdown with company names is open (r16430)
- Change: [NoAI] Stop an AI when it takes too long to initialize or load [FS#2869] (r16425)
This commit is contained in:
rubidium
2009-05-31 12:18:03 +00:00
parent 7742f8c080
commit 02f3d2d8af
7 changed files with 34 additions and 8 deletions

View File

@@ -167,6 +167,10 @@ public:
void Draw(int x, int y, uint width, uint height, bool sel, int bg_colour) const
{
CompanyID company = (CompanyID)result;
/* It's possible the company is deleted while the dropdown is open */
if (!IsValidCompanyID(company)) return;
DrawCompanyIcon(company, x + 2, y + 1);
SetDParam(0, company);