AP_InertialSensor: use NEW_NOTHROW for new(std::nothrow)
This commit is contained in:
parent
35a8f6c7b2
commit
e97a6c7089
@ -214,9 +214,9 @@ AP_InertialSensor_Backend *AP_InertialSensor_LSM9DS1::probe(AP_InertialSensor &_
|
|||||||
}
|
}
|
||||||
|
|
||||||
AP_InertialSensor_LSM9DS1 *sensor =
|
AP_InertialSensor_LSM9DS1 *sensor =
|
||||||
new AP_InertialSensor_LSM9DS1(_imu,std::move(dev),
|
NEW_NOTHROW AP_InertialSensor_LSM9DS1(_imu,std::move(dev),
|
||||||
LSM9DS1_DRY_XG_PIN,
|
LSM9DS1_DRY_XG_PIN,
|
||||||
rotation);
|
rotation);
|
||||||
if (!sensor || !sensor->_init_sensor()) {
|
if (!sensor || !sensor->_init_sensor()) {
|
||||||
delete sensor;
|
delete sensor;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user