Fix Mono check for unsafe object references

(cherry picked from commit 09534e2922)
This commit is contained in:
Rémi Verschelde 2020-02-12 20:06:30 +01:00
parent 57151c5e31
commit 57de8397b2
1 changed files with 2 additions and 2 deletions

View File

@ -161,11 +161,11 @@ void CSharpLanguage::finish() {
#ifdef DEBUG_ENABLED #ifdef DEBUG_ENABLED
for (Map<ObjectID, int>::Element *E = unsafe_object_references.front(); E; E = E->next()) { for (Map<ObjectID, int>::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); Object *obj = ObjectDB::get_instance(id);
if (obj) { 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 { } else {
ERR_PRINTS("Leaked unsafe reference to deleted object: " + itos(id)); ERR_PRINTS("Leaked unsafe reference to deleted object: " + itos(id));
} }