Merge pull request #95311 from mihe/file-access-use-after-free

Fix use-after-free in `FileAccess::exists`
This commit is contained in:
Rémi Verschelde 2024-08-09 10:24:02 +02:00
commit c73ac74c4a
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -119,6 +119,10 @@ void PackedData::_free_packed_dirs(PackedDir *p_dir) {
}
PackedData::~PackedData() {
if (singleton == this) {
singleton = nullptr;
}
for (int i = 0; i < sources.size(); i++) {
memdelete(sources[i]);
}