summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gd_script.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-28 10:44:38 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-28 10:44:38 -0300
commit565bb3afcc207aea6608bb119e21c6833f1b87b3 (patch)
tree83546dabb69c87910a79bfff77304f30ad30cc75 /modules/gdscript/gd_script.cpp
parent8e1c0f287db96f73c8715ac1fa387b430f3758ca (diff)
downloadredot-engine-565bb3afcc207aea6608bb119e21c6833f1b87b3.tar.gz
Fix extends issue, closes #4026
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
-rw-r--r--modules/gdscript/gd_script.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index e37a2ca155..99f349def5 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();