mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 23:34:15 +00:00
Fix #7988: Memory leak when using custom depot names
This commit is contained in:
parent
2f264f2c92
commit
e340934d04
@ -27,6 +27,8 @@ INSTANTIATE_POOL_METHODS(Depot)
|
||||
*/
|
||||
Depot::~Depot()
|
||||
{
|
||||
free(this->name);
|
||||
|
||||
if (CleaningPool()) return;
|
||||
|
||||
if (!IsDepotTile(this->xy) || GetDepotIndex(this->xy) != this->index) {
|
||||
|
Loading…
Reference in New Issue
Block a user