diff options
| author | Juan Linietsky | 2016-06-28 10:44:38 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-06-28 10:44:38 -0300 |
| commit | 565bb3afcc207aea6608bb119e21c6833f1b87b3 (patch) | |
| tree | 83546dabb69c87910a79bfff77304f30ad30cc75 /modules/gdscript/gd_script.cpp | |
| parent | 8e1c0f287db96f73c8715ac1fa387b430f3758ca (diff) | |
| download | godot-565bb3afcc207aea6608bb119e21c6833f1b87b3.tar.gz godot-565bb3afcc207aea6608bb119e21c6833f1b87b3.tar.zst godot-565bb3afcc207aea6608bb119e21c6833f1b87b3.zip | |
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
| -rw-r--r-- | modules/gdscript/gd_script.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index e37a2ca15..99f349def 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -874,6 +874,10 @@ GDScript::~GDScript() { memdelete( E->get() ); } + for (Map<StringName,Ref<GDScript> >::Element *E=subclasses.front();E;E=E->next()) { + E->get()->_owner=NULL; //bye, you are no longer owned cause I died + } + #ifdef DEBUG_ENABLED if (GDScriptLanguage::get_singleton()->lock) { GDScriptLanguage::get_singleton()->lock->lock(); |
