Skip to content

Commit a5830f6

Browse files
committed
Merge pull request #96317 from Chaosus/objectdb_write_path_instead_of_name_at_cleanup
Write path instead of name at verbose output of leaked instances
2 parents ed8baa3 + 75055a8 commit a5830f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/object/object.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,7 @@ void ObjectDB::cleanup() {
22972297
// Ensure calling the native classes because if a leaked instance has a script
22982298
// that overrides any of those methods, it'd not be OK to call them at this point,
22992299
// now the scripting languages have already been terminated.
2300-
MethodBind *node_get_name = ClassDB::get_method("Node", "get_name");
2300+
MethodBind *node_get_path = ClassDB::get_method("Node", "get_path");
23012301
MethodBind *resource_get_path = ClassDB::get_method("Resource", "get_path");
23022302
Callable::CallError call_error;
23032303

@@ -2307,7 +2307,7 @@ void ObjectDB::cleanup() {
23072307

23082308
String extra_info;
23092309
if (obj->is_class("Node")) {
2310-
extra_info = " - Node name: " + String(node_get_name->call(obj, nullptr, 0, call_error));
2310+
extra_info = " - Node path: " + String(node_get_path->call(obj, nullptr, 0, call_error));
23112311
}
23122312
if (obj->is_class("Resource")) {
23132313
extra_info = " - Resource path: " + String(resource_get_path->call(obj, nullptr, 0, call_error));

0 commit comments

Comments
 (0)