diff --git a/libraries/AP_Proximity/AP_Proximity_Backend.cpp b/libraries/AP_Proximity/AP_Proximity_Backend.cpp index 25cc7f22ec..24cf9d6b73 100644 --- a/libraries/AP_Proximity/AP_Proximity_Backend.cpp +++ b/libraries/AP_Proximity/AP_Proximity_Backend.cpp @@ -174,7 +174,7 @@ void AP_Proximity_Backend::update_boundary_for_sector(const uint8_t sector, cons return; } - if (push_to_OA_DB) { + if (push_to_OA_DB && _distance_valid[sector]) { database_push(_angle[sector], _distance[sector]); }