Update libraries/AP_Networking/AP_Networking.cpp

Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
This commit is contained in:
Tom Pittenger 2023-08-22 09:24:21 -07:00
parent 4bad05c49c
commit 5ddb649ed1

View File

@ -107,7 +107,7 @@ void AP_Networking::init()
if (!backend->init()) {
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "NET: backend init failed");
delete backend;
// the backend init function creates a thread which references the backend pointer; that thread may be running so don't remove the backend allocation.
backend = nullptr;
return;
}