mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix StringName leaks in VariantParser
This commit is contained in:
parent
f8818f85e6
commit
4952d37f4b
3 changed files with 7 additions and 9 deletions
|
@ -40,14 +40,14 @@ StringName WebRTCPeerConnection::default_extension;
|
|||
|
||||
void WebRTCPeerConnection::set_default_extension(const StringName &p_extension) {
|
||||
ERR_FAIL_COND_MSG(!ClassDB::is_parent_class(p_extension, WebRTCPeerConnectionExtension::get_class_static()), vformat("Can't make %s the default WebRTC extension since it does not extend WebRTCPeerConnectionExtension.", p_extension));
|
||||
default_extension = p_extension;
|
||||
default_extension = StringName(p_extension, true);
|
||||
}
|
||||
|
||||
WebRTCPeerConnection *WebRTCPeerConnection::create() {
|
||||
#ifdef WEB_ENABLED
|
||||
return memnew(WebRTCPeerConnectionJS);
|
||||
#else
|
||||
if (default_extension == String()) {
|
||||
if (default_extension == StringName()) {
|
||||
WARN_PRINT_ONCE("No default WebRTC extension configured.");
|
||||
return memnew(WebRTCPeerConnectionExtension);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue