Changeset - r12018:7238bd805bfa
[Not reviewed]
master
0 1 0
smatz - 15 years ago 2009-05-26 11:57:52
smatz@openttd.org
(svn r16430) -Fix: crash when a company is deleted while a dropdown with company names is open
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/toolbar_gui.cpp
Show inline comments
 
@@ -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);
0 comments (0 inline, 0 general)