From 57de8397b2f3d8d96bf89243ae270ead2d2a2542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 12 Feb 2020 20:06:30 +0100 Subject: [PATCH] Fix Mono check for unsafe object references (cherry picked from commit 09534e29222fd5e4f1bf7ce7cc910fd589e35d00) --- modules/mono/csharp_script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 9e19e5f8c46..baa01d2e3ab 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -161,11 +161,11 @@ void CSharpLanguage::finish() { #ifdef DEBUG_ENABLED for (Map::Element *E = unsafe_object_references.front(); E; E = E->next()) { - const ObjectID &id = E->get(); + const ObjectID &id = E->key(); Object *obj = ObjectDB::get_instance(id); if (obj) { - ERR_PRINTS("Leaked unsafe reference to object: " + obj->get_class() + ":" + itos(id)); + ERR_PRINTS("Leaked unsafe reference to object: " + obj->to_string()); } else { ERR_PRINTS("Leaked unsafe reference to deleted object: " + itos(id)); }