Skip to content

Commit 0dd6299

Browse files
committed
Merge pull request #117991 from NoctemCat/clear_base_before_next
GDScript: Clear base script in `GDScript::clear`
2 parents bbeb4a2 + 0388291 commit 0dd6299

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

modules/gdscript/gdscript.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,11 @@ void GDScript::clear() {
14821482
memdelete(E);
14831483
}
14841484
functions_to_clear.clear();
1485+
1486+
#ifdef TOOLS_ENABLED
1487+
base_cache = Ref<GDScript>();
1488+
#endif
1489+
base = Ref<GDScript>();
14851490
}
14861491

14871492
void GDScript::cancel_pending_functions(bool warn) {

0 commit comments

Comments
 (0)