You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix StringName leaks in VariantParser
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user