Merge pull request #95311 from mihe/file-access-use-after-free
Fix use-after-free in `FileAccess::exists`
This commit is contained in:
commit
c73ac74c4a
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue