diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-12-10 19:31:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 19:31:57 +0100 |
commit | 561bafe91fff234a611365d41f03df680349ac46 (patch) | |
tree | dbdb49f38e1a59f71124dab2500e42f507325a1a /modules/gdscript/gdscript_cache.h | |
parent | e9c7140cfa6fa6e839730d4f43377dc7237b8ba4 (diff) | |
parent | ff544df926d90724f2dbb6ef53667a1ee2ecdbb5 (diff) |
Merge pull request #69865 from adamscott/fix-gdscript-cache-remove-script-crash
Fix `GDScriptCache` to not remove scripts/scenes individually when clearing
Diffstat (limited to 'modules/gdscript/gdscript_cache.h')
-rw-r--r-- | modules/gdscript/gdscript_cache.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/modules/gdscript/gdscript_cache.h b/modules/gdscript/gdscript_cache.h index e7e1901d5d..0ee269f96c 100644 --- a/modules/gdscript/gdscript_cache.h +++ b/modules/gdscript/gdscript_cache.h @@ -87,7 +87,7 @@ class GDScriptCache { static GDScriptCache *singleton; - bool destructing = false; + bool cleared = false; Mutex mutex; @@ -104,13 +104,6 @@ public: static Ref<PackedScene> get_packed_scene(const String &p_path, Error &r_error, const String &p_owner = ""); static void clear_unreferenced_packed_scenes(); - static bool is_destructing() { - if (singleton == nullptr) { - return true; - } - return singleton->destructing; - }; - static void clear(); GDScriptCache(); |