Fix use-after-free in FileAccess::exists
This commit is contained in:
parent
739019e4e4
commit
613600fa89
1 changed files with 4 additions and 0 deletions
|
@ -119,6 +119,10 @@ void PackedData::_free_packed_dirs(PackedDir *p_dir) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PackedData::~PackedData() {
|
PackedData::~PackedData() {
|
||||||
|
if (singleton == this) {
|
||||||
|
singleton = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < sources.size(); i++) {
|
for (int i = 0; i < sources.size(); i++) {
|
||||||
memdelete(sources[i]);
|
memdelete(sources[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue