Changeset - r4617:408a5195583f
[Not reviewed]
master
0 1 0
peter1138 - 18 years ago 2006-09-18 06:34:37
peter1138@openttd.org
(svn r6475) - Fix (r6055): Don't try to sort industries when there are none. Thanks to 'Delboy'
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
industry_gui.c
Show inline comments
 
@@ -556,6 +556,9 @@ static void MakeSortedIndustryList(void)
 
	const Industry* i;
 
	int n = 0;
 

	
 
	/* Don't attempt a sort if there are no industries */
 
	if (GetIndustryArraySize() == 0) return;
 

	
 
	/* Create array for sorting */
 
	_industry_sort = realloc((void *)_industry_sort, GetIndustryArraySize() * sizeof(_industry_sort[0]));
 
	if (_industry_sort == NULL)
0 comments (0 inline, 0 general)