From e5a63eaad0f4ce5ba0dda6cb42a084c2d2ca690d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:13 +1000 Subject: [PATCH] AP_Motors: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_Motors/AP_Motors_Class.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Motors/AP_Motors_Class.cpp b/libraries/AP_Motors/AP_Motors_Class.cpp index b5d81c13b7..9995dca6b7 100644 --- a/libraries/AP_Motors/AP_Motors_Class.cpp +++ b/libraries/AP_Motors/AP_Motors_Class.cpp @@ -286,7 +286,7 @@ void AP_Motors::set_frame_string(const char * str) { return; } const size_t len = strlen(str)+1; - custom_frame_string = new char[len]; + custom_frame_string = NEW_NOTHROW char[len]; if (custom_frame_string != nullptr) { strncpy(custom_frame_string, str, len); }