diff --git a/libraries/AP_HAL_Empty/SPIDevice.h b/libraries/AP_HAL_Empty/SPIDevice.h index be25c2873c..62849e7de2 100644 --- a/libraries/AP_HAL_Empty/SPIDevice.h +++ b/libraries/AP_HAL_Empty/SPIDevice.h @@ -77,7 +77,7 @@ public: SPIDeviceManager() { } AP_HAL::OwnPtr get_device(const char *name) override { - return AP_HAL::OwnPtr(new SPIDevice()); + return AP_HAL::OwnPtr(NEW_NOTHROW SPIDevice()); } };