From a74dab8c0a2ff999767b839b37b4ffee23a14953 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 23 Feb 2024 11:59:06 +1100 Subject: [PATCH] HAL_SITL: don't run IO procs in examples --- libraries/AP_HAL_SITL/Scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }