Skip to content

Commit

Permalink
AP_Networking: init socket null check
Browse files Browse the repository at this point in the history
  • Loading branch information
magicrub committed Nov 17, 2023
1 parent 35188e0 commit cdaa73a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/AP_Networking/AP_Networking_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cdaa73a

Please sign in to comment.