5
0
mirror of https://github.com/ArduPilot/ardupilot synced 2025-01-06 07:58:28 -04:00

SITL: fixed crash in example code run

This commit is contained in:
Andrew Tridgell 2019-04-09 11:11:38 +10:00
parent dc452d41d2
commit d57ea43ea6

View File

@ -785,7 +785,9 @@ void Aircraft::update_external_payload(const struct sitl_input &input)
void Aircraft::add_shove_forces(Vector3f &rot_accel, Vector3f &body_accel)
{
const uint32_t now = AP_HAL::millis();
if (sitl == nullptr) {
return;
}
if (sitl->shove.t == 0) {
return;
}