mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-16 17:15:05 +01: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()
|
Depot::~Depot()
|
||||||
{
|
{
|
||||||
|
free(this->name);
|
||||||
|
|
||||||
if (CleaningPool()) return;
|
if (CleaningPool()) return;
|
||||||
|
|
||||||
if (!IsDepotTile(this->xy) || GetDepotIndex(this->xy) != this->index) {
|
if (!IsDepotTile(this->xy) || GetDepotIndex(this->xy) != this->index) {
|
||||||
|
Loading…
Reference in New Issue
Block a user