AP_Networking: init socket null check

This commit is contained in:
Tom Pittenger 2023-11-17 11:21:12 -08:00 committed by Tom Pittenger
parent 30bccf6266
commit fcf602cbe2

View File

@ -78,6 +78,9 @@ void AP_Networking::Port::udp_client_init(const uint32_t size_rx, const uint32_t
if (!init_buffers(size_rx, size_tx)) {
return;
}
if (sock != nullptr) {
return false;
}
sock = new SocketAPM(true);
if (sock == nullptr) {
return;