mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r16430) -Fix: crash when a company is deleted while a dropdown with company names is open
This commit is contained in:
parent
a10e5f707a
commit
af07333c78
@ -167,6 +167,10 @@ public:
|
||||
void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const
|
||||
{
|
||||
CompanyID company = (CompanyID)result;
|
||||
|
||||
/* It's possible the company is deleted while the dropdown is open */
|
||||
if (!Company::IsValidID(company)) return;
|
||||
|
||||
DrawCompanyIcon(company, left + 2, top + 1);
|
||||
|
||||
SetDParam(0, company);
|
||||
|
Loading…
Reference in New Issue
Block a user