mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 11:22:45 +01:00
Codefix: Delete PersistentStorage when a town is deleted. (#12903)
This commit is contained in:
@@ -148,6 +148,9 @@ Town::~Town()
|
||||
}
|
||||
|
||||
/* Clear the persistent storage list. */
|
||||
for (auto &psa : this->psa_list) {
|
||||
delete psa;
|
||||
}
|
||||
this->psa_list.clear();
|
||||
|
||||
DeleteSubsidyWith(SourceType::Town, this->index);
|
||||
|
||||
Reference in New Issue
Block a user