diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_Buffer.h b/libraries/AP_NavEKF2/AP_NavEKF2_Buffer.h index 6fba6bdf5e..ae35dca04c 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_Buffer.h +++ b/libraries/AP_NavEKF2/AP_NavEKF2_Buffer.h @@ -85,6 +85,9 @@ public: */ inline void push(element_type element) { + if (buffer == nullptr) { + return; + } // Advance head to next available index _head = (_head+1)%_size; // New data is written at the head