diff --git a/libraries/AP_NavEKF3/AP_NavEKF3_Buffer.h b/libraries/AP_NavEKF3/AP_NavEKF3_Buffer.h index 327e361935..6672fe4a88 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3_Buffer.h +++ b/libraries/AP_NavEKF3/AP_NavEKF3_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