Skip to content

Commit

Permalink
Write path instead of name at verbose output of leaked instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaosus committed Aug 30, 2024
1 parent fd7239c commit 75055a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,7 @@ void ObjectDB::cleanup() {
// 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,
// 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");
Callable::CallError call_error;

Expand All @@ -2304,7 +2304,7 @@ void ObjectDB::cleanup() {

String extra_info;
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")) {
extra_info = " - Resource path: " + String(resource_get_path->call(obj, nullptr, 0, call_error));
Expand Down

0 comments on commit 75055a8

Please sign in to comment.