diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 991b94db38ed..02bf0a603935 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -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]); }