From 097c2011e19181e84501d1e1aa0fdd62e76463b2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 10 Jan 2016 21:26:35 +1100 Subject: [PATCH] HAL_SITL: prevent abort on select with -1 fd --- libraries/AP_HAL_SITL/UARTDriver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_HAL_SITL/UARTDriver.cpp b/libraries/AP_HAL_SITL/UARTDriver.cpp index d954838188..5ca6cb5b96 100644 --- a/libraries/AP_HAL_SITL/UARTDriver.cpp +++ b/libraries/AP_HAL_SITL/UARTDriver.cpp @@ -385,6 +385,9 @@ void UARTDriver::_set_nonblocking(int fd) void UARTDriver::_timer_tick(void) { + if (!_connected) { + return; + } uint32_t navail; ssize_t nwritten;