diff --git a/libraries/AP_HAL_SITL/Scheduler.cpp b/libraries/AP_HAL_SITL/Scheduler.cpp index 12a77a8d0c..32eeebfa70 100644 --- a/libraries/AP_HAL_SITL/Scheduler.cpp +++ b/libraries/AP_HAL_SITL/Scheduler.cpp @@ -301,7 +301,7 @@ void Scheduler::_run_io_procs() void Scheduler::stop_clock(uint64_t time_usec) { _stopped_clock_usec = time_usec; - if (time_usec - _last_io_run > 10000) { + if (_sitlState->_sitl != nullptr && time_usec - _last_io_run > 10000) { _last_io_run = time_usec; _run_io_procs(); }