summaryrefslogtreecommitdiffstats
path: root/modules/webrtc/webrtc_peer_connection.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-10-19 17:11:42 +0200
committerYuri Sizov <yuris@humnom.net>2023-10-19 17:13:15 +0200
commit4952d37f4bfaaed43644f56c6798f4c43e70bf68 (patch)
treed48e0fa3374f2c514c05289407187bf64a6b6f67 /modules/webrtc/webrtc_peer_connection.cpp
parentf8818f85e6c43cdf1277e8ae85eba19ca0a003b0 (diff)
downloadredot-engine-4952d37f4bfaaed43644f56c6798f4c43e70bf68.tar.gz
Fix StringName leaks in VariantParser
Diffstat (limited to 'modules/webrtc/webrtc_peer_connection.cpp')
-rw-r--r--modules/webrtc/webrtc_peer_connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/webrtc/webrtc_peer_connection.cpp b/modules/webrtc/webrtc_peer_connection.cpp
index 8bad6fd784..0a50b677c4 100644
--- a/modules/webrtc/webrtc_peer_connection.cpp
+++ b/modules/webrtc/webrtc_peer_connection.cpp
@@ -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);
}