From 98caad29f5fe6a35492eba14e79cc87342fae9e0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:10 +1000 Subject: [PATCH] AP_CustomRotations: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_CustomRotations/AP_CustomRotations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_CustomRotations/AP_CustomRotations.cpp b/libraries/AP_CustomRotations/AP_CustomRotations.cpp index ad938c1b10..86345121a8 100644 --- a/libraries/AP_CustomRotations/AP_CustomRotations.cpp +++ b/libraries/AP_CustomRotations/AP_CustomRotations.cpp @@ -139,7 +139,7 @@ AP_CustomRotation* AP_CustomRotations::get_rotation(Rotation r) } const uint8_t index = r - ROTATION_CUSTOM_1; if (rotations[index] == nullptr) { - rotations[index] = new AP_CustomRotation(params[index]); + rotations[index] = NEW_NOTHROW AP_CustomRotation(params[index]); // make sure param is enabled if custom rotation is used enable.set_and_save_ifchanged(1); }