summaryrefslogtreecommitdiffstats
path: root/core/io/dtls_server.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-06-06 16:51:16 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-06-06 17:33:43 +0200
commit054f52364fe3c204ca65fca905a5bb3261315e47 (patch)
treec90bfb4763c6a845e38fccf6cf62d3977d14b88b /core/io/dtls_server.cpp
parent17af0104785eac9c416bb89989d82e2968f8ab8f (diff)
downloadredot-engine-054f52364fe3c204ca65fca905a5bb3261315e47.tar.gz
Fix editor crash when mbedtls is disabled.
Diffstat (limited to 'core/io/dtls_server.cpp')
-rw-r--r--core/io/dtls_server.cpp5
1 files changed, 4 insertions, 1 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() {