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

This commit is contained in:
Andrew Tridgell
2024-06-04 09:20:21 +10:00
parent 62e3c6e5a4
commit 375eab8560
+1 -1
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;