mirror of https://github.com/OpenTTD/OpenTTD
(svn r20540) -Fix [FS#4049](r20480): use CmdDeleteTown instead of direct use of operator delete
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