From f9bcaccc112425fcc462c761bfcc82cc8030f318 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 27 Feb 2023 09:42:46 +0100 Subject: [PATCH] [MP] Fix orphan StringName on close. Use a static StringName for the registered default interface name. --- scene/main/multiplayer_api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/main/multiplayer_api.cpp b/scene/main/multiplayer_api.cpp index 950eb2809cd..35e4302bb70 100644 --- a/scene/main/multiplayer_api.cpp +++ b/scene/main/multiplayer_api.cpp @@ -43,7 +43,7 @@ StringName MultiplayerAPI::default_interface; void MultiplayerAPI::set_default_interface(const StringName &p_interface) { ERR_FAIL_COND_MSG(!ClassDB::is_parent_class(p_interface, MultiplayerAPI::get_class_static()), vformat("Can't make %s the default multiplayer interface since it does not extend MultiplayerAPI.", p_interface)); - default_interface = p_interface; + default_interface = StringName(p_interface, true); } StringName MultiplayerAPI::get_default_interface() {