summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2014-03-02 10:13:33 +0100
committerRALOVICH, Kristof <tade60@freemail.hu>2014-03-02 10:13:33 +0100
commita52eebc9564dceff6c558aca11c87ca1cf99a50b (patch)
tree1bdd1b56e18a279dfc57059fc7cc0237d6ecb9e8
parent958b742b35f5bd35482ddb53e088adb13114eb7b (diff)
serial: try to actually open a device under win too
Otherwise nothing happens...
-rw-r--r--src/Serial.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Serial.cpp b/src/Serial.cpp
index 291b5d2..07de0bb 100644
--- a/src/Serial.cpp
+++ b/src/Serial.cpp
@@ -74,7 +74,13 @@ Serial::instantiate(void*)
Serial* s = new SerialUsb();
if(!s)
return NULL;
-#ifndef _WIN32
+#ifdef _WIN32
+ if(!s->open())
+ {
+ delete s;
+ return NULL;
+ }
+#else
if(!s->open())
{
delete s;