diff options
author | Kostadin Damyanov <maxmight@gmail.com> | 2015-09-05 12:03:17 +0300 |
---|---|---|
committer | Kostadin Damyanov <maxmight@gmail.com> | 2015-09-05 12:03:17 +0300 |
commit | c5f574b914b3cb11d97ae616df4a0bced45bb17c (patch) | |
tree | d7b70f0842c00c480ce10039b873a1dddd894a6c /core/variant.cpp | |
parent | 2a757a6ad4ef4e7767b7d3ef7e177ec6613ef6d1 (diff) | |
parent | b0aa49accbd7e45dae38f1bd43b0fbdd11714211 (diff) | |
download | redot-engine-c5f574b914b3cb11d97ae616df4a0bced45bb17c.tar.gz |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'core/variant.cpp')
-rw-r--r-- | core/variant.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/variant.cpp b/core/variant.cpp index e0bceb4dd8..c6a55b10e6 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1592,9 +1592,17 @@ Variant::operator String() const { } break; case OBJECT: { - if (_get_obj().obj) + if (_get_obj().obj) { + #ifdef DEBUG_ENABLED + if (ScriptDebugger::get_singleton() && _get_obj().ref.is_null()) { + //only if debugging! + if (!ObjectDB::instance_validate(_get_obj().obj)) { + return "[Deleted Object]"; + }; + }; + #endif return "["+_get_obj().obj->get_type()+":"+itos(_get_obj().obj->get_instance_ID())+"]"; - else + } else return "[Object:null]"; } break; |