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
This commit is contained in:
Rémi Verschelde 2024-08-30 11:43:13 +02:00
commit a5830f6eb9
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 2 deletions

View File

@ -2297,7 +2297,7 @@ void ObjectDB::cleanup() {
// Ensure calling the native classes because if a leaked instance has a script // Ensure calling the native classes because if a leaked instance has a script
// that overrides any of those methods, it'd not be OK to call them at this point, // that overrides any of those methods, it'd not be OK to call them at this point,
// now the scripting languages have already been terminated. // now the scripting languages have already been terminated.
MethodBind *node_get_name = ClassDB::get_method("Node", "get_name"); MethodBind *node_get_path = ClassDB::get_method("Node", "get_path");
MethodBind *resource_get_path = ClassDB::get_method("Resource", "get_path"); MethodBind *resource_get_path = ClassDB::get_method("Resource", "get_path");
Callable::CallError call_error; Callable::CallError call_error;
@ -2307,7 +2307,7 @@ void ObjectDB::cleanup() {
String extra_info; String extra_info;
if (obj->is_class("Node")) { if (obj->is_class("Node")) {
extra_info = " - Node name: " + String(node_get_name->call(obj, nullptr, 0, call_error)); extra_info = " - Node path: " + String(node_get_path->call(obj, nullptr, 0, call_error));
} }
if (obj->is_class("Resource")) { if (obj->is_class("Resource")) {
extra_info = " - Resource path: " + String(resource_get_path->call(obj, nullptr, 0, call_error)); extra_info = " - Resource path: " + String(resource_get_path->call(obj, nullptr, 0, call_error));