Skip to content

Commit

Permalink
Merge pull request godotengine#96317 from Chaosus/objectdb_write_path…
Browse files Browse the repository at this point in the history
…_instead_of_name_at_cleanup

Write path instead of name at verbose output of leaked instances
  • Loading branch information
akien-mga committed Aug 30, 2024
2 parents ed8baa3 + 75055a8 commit a5830f6
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 @@ -2297,7 +2297,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 @@ -2307,7 +2307,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 a5830f6

Please sign in to comment.