From b0aa49accbd7e45dae38f1bd43b0fbdd11714211 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 3 Sep 2015 23:24:55 -0300 Subject: merged some stuff for okam --- core/variant.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'core/variant.cpp') 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; -- cgit v1.2.3