AP_GyroFFT: use NEW_NOTHROW for new(std::nothrow)

This commit is contained in:
Andrew Tridgell 2024-05-27 11:24:11 +10:00
parent 62e3c6e5a4
commit 375eab8560
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ void AP_GyroFFT::init(uint16_t loop_rate_hz)
}
_current_sample_mode = _sample_mode;
_ref_energy = new Vector3f[_window_size];
_ref_energy = NEW_NOTHROW Vector3f[_window_size];
if (_ref_energy == nullptr) {
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "Failed to allocate window for AP_GyroFFT");
return;