Copter: correct nullptr check for circle nav allocation

This commit is contained in:
Peter Barker 2018-02-22 16:06:25 +11:00 committed by Randy Mackay
parent e05cba5d2c
commit 1a68979050
1 changed files with 1 additions and 1 deletions

View File

@ -610,7 +610,7 @@ void Copter::allocate_motors(void)
AP_Param::load_object_from_eeprom(wp_nav, wp_nav->var_info);
circle_nav = new AC_Circle(inertial_nav, *ahrs_view, *pos_control);
if (wp_nav == nullptr) {
if (circle_nav == nullptr) {
AP_HAL::panic("Unable to allocate CircleNav");
}
AP_Param::load_object_from_eeprom(circle_nav, circle_nav->var_info);