diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-05-19 08:40:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-19 08:40:25 +0200 |
commit | 138882742a95366c833b54035ad58a5764856ffa (patch) | |
tree | c8b4e6735ad51daf8c5804463be83ced3700b081 /thirdparty/enet/godot.cpp | |
parent | 60e8a06d4eec393d0a2fc277bd66f080f55333b6 (diff) | |
parent | 5fe254e8f681f400f2ebab187486998f499387f9 (diff) |
Merge pull request #77202 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 5th batch
Diffstat (limited to 'thirdparty/enet/godot.cpp')
-rw-r--r-- | thirdparty/enet/godot.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp index ea7f4957a2..2cbfe59fc6 100644 --- a/thirdparty/enet/godot.cpp +++ b/thirdparty/enet/godot.cpp @@ -436,6 +436,7 @@ ENetSocket enet_socket_create(ENetSocketType type) { } int enet_host_dtls_server_setup(ENetHost *host, void *p_options) { + ERR_FAIL_COND_V_MSG(!DTLSServer::is_available(), -1, "DTLS server is not available in this build."); ENetGodotSocket *sock = (ENetGodotSocket *)host->socket; if (!sock->can_upgrade()) { return -1; @@ -446,6 +447,7 @@ int enet_host_dtls_server_setup(ENetHost *host, void *p_options) { } int enet_host_dtls_client_setup(ENetHost *host, const char *p_for_hostname, void *p_options) { + ERR_FAIL_COND_V_MSG(!PacketPeerDTLS::is_available(), -1, "DTLS is not available in this build."); ENetGodotSocket *sock = (ENetGodotSocket *)host->socket; if (!sock->can_upgrade()) { return -1; |