From 19c05e878c210b7d74997fab39bc8512cf0d41ca Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 22 Dec 2019 10:14:39 -0330 Subject: [PATCH] Fix compile error in Windows port from recent code refactoring. --- src/windows/SerialPortWINDOWS.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/windows/SerialPortWINDOWS.cxx b/src/windows/SerialPortWINDOWS.cxx index bb81942af..0f6e67fa5 100644 --- a/src/windows/SerialPortWINDOWS.cxx +++ b/src/windows/SerialPortWINDOWS.cxx @@ -52,7 +52,8 @@ bool SerialPortWINDOWS::openPort(const string& device) dcb.DCBlength = sizeof(dcb); if(!BuildCommDCB("19200,n,8,1", &dcb)) { - closePort(); + CloseHandle(myHandle); + myHandle = 0; return false; }