Merge pull request #15995 from GodotExplorer/pr-debugger-weakref

Remote debugger send the real instance of WeakRef referenced to
This commit is contained in:
Rémi Verschelde 2018-01-30 13:43:02 +01:00 committed by GitHub
commit 5b580fb69b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -598,7 +598,13 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) {
Array send_props;
for (int i = 0; i < properties.size(); i++) {
const PropertyInfo &pi = properties[i].first;
const Variant &var = properties[i].second;
Variant &var = properties[i].second;
WeakRef *ref = Object::cast_to<WeakRef>(var);
if (ref) {
var = ref->get_ref();
}
RES res = var;
Array prop;