From 719369c71b30c404bf721afbbfad21897b28e09c Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Sat, 23 May 2020 11:52:02 +0200 Subject: [PATCH] Fix resource preview in remote inspector The specific case for object reference seems unnecessary, as `RES res = var` already does the work. The case where REF is invalid is never hit in the case of already freed objects. The assignment `res = *r` was causing the resource to be always invalidated on the 3.2 branch. (cherry picked from commit 12685df42366dc8d2f32d5c97de225827559192f) --- scene/debugger/script_debugger_remote.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scene/debugger/script_debugger_remote.cpp b/scene/debugger/script_debugger_remote.cpp index 75ac08a7d21..628a30af1d5 100644 --- a/scene/debugger/script_debugger_remote.cpp +++ b/scene/debugger/script_debugger_remote.cpp @@ -682,15 +682,6 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) { RES res = var; - if (var.get_type() == Variant::OBJECT && var.is_ref()) { - REF r = var; - if (r.is_valid()) { - res = *r; - } else { - res = RES(); - } - } - Array prop; prop.push_back(pi.name); prop.push_back(pi.type);