Fix editor crash when mbedtls is disabled.
(cherry picked from commit 054f52364f
)
This commit is contained in:
parent
e94aab7936
commit
402a7e0094
2 changed files with 8 additions and 2 deletions
|
@ -37,8 +37,11 @@ bool DTLSServer::available = false;
|
||||||
|
|
||||||
DTLSServer *DTLSServer::create() {
|
DTLSServer *DTLSServer::create() {
|
||||||
|
|
||||||
|
if (_create) {
|
||||||
return _create();
|
return _create();
|
||||||
}
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bool DTLSServer::is_available() {
|
bool DTLSServer::is_available() {
|
||||||
return available;
|
return available;
|
||||||
|
|
|
@ -37,8 +37,11 @@ bool PacketPeerDTLS::available = false;
|
||||||
|
|
||||||
PacketPeerDTLS *PacketPeerDTLS::create() {
|
PacketPeerDTLS *PacketPeerDTLS::create() {
|
||||||
|
|
||||||
|
if (_create) {
|
||||||
return _create();
|
return _create();
|
||||||
}
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bool PacketPeerDTLS::is_available() {
|
bool PacketPeerDTLS::is_available() {
|
||||||
return available;
|
return available;
|
||||||
|
|
Loading…
Reference in a new issue