diff options
| author | Juan Linietsky | 2015-06-29 00:29:49 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-06-29 00:29:49 -0300 |
| commit | 95047562d743b1c1fdc007432c8a0c145a455c5d (patch) | |
| tree | f563e5c900c4330fcc602b6e5a721bc63022b253 /core/object.cpp | |
| parent | 2b64f73b0459190d20b2f6de39275ee7979317c4 (diff) | |
| download | godot-95047562d743b1c1fdc007432c8a0c145a455c5d.tar.gz godot-95047562d743b1c1fdc007432c8a0c145a455c5d.tar.zst godot-95047562d743b1c1fdc007432c8a0c145a455c5d.zip | |
Diffstat (limited to 'core/object.cpp')
| -rw-r--r-- | core/object.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/object.cpp b/core/object.cpp index 6bb7973ce..07ac430d7 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -258,12 +258,15 @@ bool Object::_predelete() { _predelete_ok=1; notification(NOTIFICATION_PREDELETE,true); + if (_predelete_ok) { + _type_ptr=NULL; //must restore so destructors can access type ptr correctly + } return _predelete_ok; } void Object::_postinitialize() { - + _type_ptr=_get_type_namev(); _initialize_typev(); notification(NOTIFICATION_POSTINITIALIZE); @@ -1707,7 +1710,7 @@ bool Object::is_edited() const { Object::Object() { - + _type_ptr=NULL; _block_signals=false; _predelete_ok=0; _instance_ID=0; |
