Fix editor crash when mbedtls is disabled.
This commit is contained in:
parent
17af010478
commit
054f52364f
|
@ -37,8 +37,11 @@ DTLSServer *(*DTLSServer::_create)() = nullptr;
|
||||||
bool DTLSServer::available = false;
|
bool DTLSServer::available = false;
|
||||||
|
|
||||||
DTLSServer *DTLSServer::create() {
|
DTLSServer *DTLSServer::create() {
|
||||||
|
if (_create) {
|
||||||
return _create();
|
return _create();
|
||||||
}
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
bool DTLSServer::is_available() {
|
bool DTLSServer::is_available() {
|
||||||
return available;
|
return available;
|
||||||
|
|
|
@ -36,8 +36,11 @@ PacketPeerDTLS *(*PacketPeerDTLS::_create)() = nullptr;
|
||||||
bool PacketPeerDTLS::available = false;
|
bool PacketPeerDTLS::available = false;
|
||||||
|
|
||||||
PacketPeerDTLS *PacketPeerDTLS::create() {
|
PacketPeerDTLS *PacketPeerDTLS::create() {
|
||||||
|
if (_create) {
|
||||||
return _create();
|
return _create();
|
||||||
}
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
bool PacketPeerDTLS::is_available() {
|
bool PacketPeerDTLS::is_available() {
|
||||||
return available;
|
return available;
|
||||||
|
|
Loading…
Reference in New Issue