Browse Source

Check for socket nullptr in TCPLink::writeBytes

QGC4.4
Nate Weibley 9 years ago
parent
commit
0aaca17666
  1. 3
      src/comm/TCPLink.cc

3
src/comm/TCPLink.cc

@ -93,6 +93,9 @@ void TCPLink::writeBytes(const QByteArray data)
#ifdef TCPLINK_READWRITE_DEBUG #ifdef TCPLINK_READWRITE_DEBUG
_writeDebugBytes(data); _writeDebugBytes(data);
#endif #endif
if (!_socket)
return;
_socket->write(data); _socket->write(data);
_logOutputDataRate(data.size(), QDateTime::currentMSecsSinceEpoch()); _logOutputDataRate(data.size(), QDateTime::currentMSecsSinceEpoch());
} }

Loading…
Cancel
Save