diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-06-06 16:51:16 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-06-06 17:33:43 +0200 |
commit | 054f52364fe3c204ca65fca905a5bb3261315e47 (patch) | |
tree | c90bfb4763c6a845e38fccf6cf62d3977d14b88b /core | |
parent | 17af0104785eac9c416bb89989d82e2968f8ab8f (diff) |
Fix editor crash when mbedtls is disabled.
Diffstat (limited to 'core')
-rw-r--r-- | core/io/dtls_server.cpp | 5 | ||||
-rw-r--r-- | core/io/packet_peer_dtls.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/core/io/dtls_server.cpp b/core/io/dtls_server.cpp index 0278027c50..e43b1f5385 100644 --- a/core/io/dtls_server.cpp +++ b/core/io/dtls_server.cpp @@ -37,7 +37,10 @@ DTLSServer *(*DTLSServer::_create)() = nullptr; bool DTLSServer::available = false; DTLSServer *DTLSServer::create() { - return _create(); + if (_create) { + return _create(); + } + return nullptr; } bool DTLSServer::is_available() { diff --git a/core/io/packet_peer_dtls.cpp b/core/io/packet_peer_dtls.cpp index 67579c339a..632f86a9f6 100644 --- a/core/io/packet_peer_dtls.cpp +++ b/core/io/packet_peer_dtls.cpp @@ -36,7 +36,10 @@ PacketPeerDTLS *(*PacketPeerDTLS::_create)() = nullptr; bool PacketPeerDTLS::available = false; PacketPeerDTLS *PacketPeerDTLS::create() { - return _create(); + if (_create) { + return _create(); + } + return nullptr; } bool PacketPeerDTLS::is_available() { |