mirror of https://github.com/OpenTTD/OpenTTD
Codefix: Delete PersistentStorage when a town is deleted. (#12903)
parent
e4c04e86c0
commit
0f0f3d74ca
|
@ -148,6 +148,9 @@ Town::~Town()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear the persistent storage list. */
|
/* Clear the persistent storage list. */
|
||||||
|
for (auto &psa : this->psa_list) {
|
||||||
|
delete psa;
|
||||||
|
}
|
||||||
this->psa_list.clear();
|
this->psa_list.clear();
|
||||||
|
|
||||||
DeleteSubsidyWith(SourceType::Town, this->index);
|
DeleteSubsidyWith(SourceType::Town, this->index);
|
||||||
|
|
Loading…
Reference in New Issue