From 98697ba5d3f0fc9ea736981cb3bde8be66fa95f5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:12 +1000 Subject: [PATCH] AP_KDECAN: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_KDECAN/AP_KDECAN.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_KDECAN/AP_KDECAN.cpp b/libraries/AP_KDECAN/AP_KDECAN.cpp index db0afdf4ab..bf3272519c 100644 --- a/libraries/AP_KDECAN/AP_KDECAN.cpp +++ b/libraries/AP_KDECAN/AP_KDECAN.cpp @@ -63,7 +63,7 @@ void AP_KDECAN::init() for (uint8_t i = 0; i < HAL_NUM_CAN_IFACES; i++) { if (CANSensor::get_driver_type(i) == AP_CAN::Protocol::KDECAN) { - _driver = new AP_KDECAN_Driver(); + _driver = NEW_NOTHROW AP_KDECAN_Driver(); return; } }