SITL: fixed crash in example code run
This commit is contained in:
parent
dc452d41d2
commit
d57ea43ea6
@ -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)
|
void Aircraft::add_shove_forces(Vector3f &rot_accel, Vector3f &body_accel)
|
||||||
{
|
{
|
||||||
const uint32_t now = AP_HAL::millis();
|
const uint32_t now = AP_HAL::millis();
|
||||||
|
if (sitl == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (sitl->shove.t == 0) {
|
if (sitl->shove.t == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user