Merge pull request #117991 from NoctemCat/clear_base_before_next

GDScript: Clear base script in `GDScript::clear`
This commit is contained in:
Thaddeus Crews
2026-06-18 15:14:20 -05:00
+5
View File
@@ -1482,6 +1482,11 @@ void GDScript::clear() {
memdelete(E);
}
functions_to_clear.clear();
#ifdef TOOLS_ENABLED
base_cache = Ref<GDScript>();
#endif
base = Ref<GDScript>();
}
void GDScript::cancel_pending_functions(bool warn) {