diff options
Diffstat (limited to 'modules/mbedtls/stream_peer_mbed_tls.cpp')
-rwxr-xr-x | modules/mbedtls/stream_peer_mbed_tls.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mbedtls/stream_peer_mbed_tls.cpp b/modules/mbedtls/stream_peer_mbed_tls.cpp index 45d3b86919..4bb7557150 100755 --- a/modules/mbedtls/stream_peer_mbed_tls.cpp +++ b/modules/mbedtls/stream_peer_mbed_tls.cpp @@ -33,8 +33,6 @@ #include "core/io/stream_peer_tcp.h" #include "core/os/file_access.h" -#include <mbedtls/platform_util.h> - static void my_debug(void *ctx, int level, const char *file, int line, const char *str) { @@ -122,6 +120,8 @@ Error StreamPeerMbedTLS::_do_handshake() { Error StreamPeerMbedTLS::connect_to_stream(Ref<StreamPeer> p_base, bool p_validate_certs, const String &p_for_hostname) { + ERR_FAIL_COND_V(p_base.is_null(), ERR_INVALID_PARAMETER); + base = p_base; int ret = 0; int authmode = p_validate_certs ? MBEDTLS_SSL_VERIFY_REQUIRED : MBEDTLS_SSL_VERIFY_NONE; |