diff options
author | MarianoGNU <marianognu.easyrpg@gmail.com> | 2015-10-16 23:21:39 -0300 |
---|---|---|
committer | MarianoGNU <marianognu.easyrpg@gmail.com> | 2015-10-16 23:21:39 -0300 |
commit | a5ebb525000d8301f73377426a2c1924d70aaf86 (patch) | |
tree | 55eaf1e0e6553dbb34d236b07a051689ae8f2493 /core/variant.cpp | |
parent | 553edf1f250f34ca0ef0703b13b4d601f609e491 (diff) | |
parent | 17a90ddc0824bb51b5ea707f5d4d11aed301f91d (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
# Solved Conflicts:
# tools/editor/property_editor.cpp
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; |