mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
navigator: check _navigation_mode_array before run
This commit is contained in:
parent
da186877c9
commit
d53bb581c2
@ -710,7 +710,9 @@ Navigator::run()
|
||||
|
||||
/* iterate through navigation modes and set active/inactive for each */
|
||||
for (unsigned int i = 0; i < NAVIGATOR_MODE_ARRAY_SIZE; i++) {
|
||||
_navigation_mode_array[i]->run(_navigation_mode == _navigation_mode_array[i]);
|
||||
if (_navigation_mode_array[i]) {
|
||||
_navigation_mode_array[i]->run(_navigation_mode == _navigation_mode_array[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* if nothing is running, set position setpoint triplet invalid once */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user