From fc9283964affdb5c719c9bd86b213d7937a7f37b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 30 Jun 2016 20:45:03 +1000 Subject: [PATCH] HAL_SITL: fixed segv on cygwin --- 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 b468481535..a03d92c7e0 100644 --- a/libraries/AP_HAL_SITL/UARTDriver.cpp +++ b/libraries/AP_HAL_SITL/UARTDriver.cpp @@ -367,6 +367,9 @@ void UARTDriver::_check_connection(void) */ bool UARTDriver::_select_check(int fd) { + if (fd == -1) { + return false; + } fd_set fds; struct timeval tv;