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

This commit is contained in:
Andrew Tridgell 2024-05-27 11:24:09 +10:00
parent 6f6648a35c
commit 9ace1c6792
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ void AP_Avoidance::init(void)
{
debug("ADSB initialisation: %d obstacles", _obstacles_max.get());
if (_obstacles == nullptr) {
_obstacles = new AP_Avoidance::Obstacle[_obstacles_max];
_obstacles = NEW_NOTHROW AP_Avoidance::Obstacle[_obstacles_max];
if (_obstacles == nullptr) {
// dynamic RAM allocation of _obstacles[] failed, disable gracefully