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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user