diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp index 68028a9669..9ba2eac4b4 100644 --- a/libraries/AP_GPS/AP_GPS.cpp +++ b/libraries/AP_GPS/AP_GPS.cpp @@ -1541,6 +1541,10 @@ bool AP_GPS::calc_blend_weights(void) } } + if (!is_positive(sum_of_all_weights)) { + return false; + } + // calculate an overall weight for (uint8_t i=0; i