mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 21:33:51 +00:00
(svn r6475) - Fix (r6055): Don't try to sort industries when there are none. Thanks to 'Delboy'
This commit is contained in:
parent
37e00dbef2
commit
6717160ebe
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user