mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-05 20:09:38 +01:00
(svn r20540) -Fix [FS#4049](r20480): use CmdDeleteTown instead of direct use of operator delete
This commit is contained in:
parent
38ca44594f
commit
d28985fe8e
@ -1764,7 +1764,7 @@ static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size
|
||||
/* if the population is still 0 at the point, then the
|
||||
* placement is so bad it couldn't grow at all */
|
||||
if (t->population > 0) return t;
|
||||
delete t;
|
||||
DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN);
|
||||
} while (--attempts != 0);
|
||||
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user