Browse Source

Fix small logic error with NULL serial port.

QGC4.4
dogmaphobic 10 years ago
parent
commit
ea9144ef46
  1. 3
      src/comm/SerialLink.cc

3
src/comm/SerialLink.cc

@ -463,12 +463,11 @@ bool SerialLink::hardwareConnect(QString &type) @@ -463,12 +463,11 @@ bool SerialLink::hardwareConnect(QString &type)
}
m_port = new QSerialPort(m_portName);
m_port->moveToThread(this);
if (!m_port) {
emit communicationUpdate(getName(),"Error opening port: " + m_portName);
return false; // couldn't create serial port.
}
m_port->moveToThread(this);
// We need to catch this signal and then emit disconnected. You can't connect
// signal to signal otherwise disonnected will have the wrong QObject::Sender

Loading…
Cancel
Save