Set pty serial port to NULL by default

merge-requests/4/head
Phil Taylor 2021-05-13 23:13:48 +01:00
rodzic 65602b5e48
commit 70363e50e8
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -240,7 +240,7 @@ void pttyHandler::receiveDataIn(int fd) {
void pttyHandler::closePort()
{
#ifdef Q_OS_WIN
if (port)
if (port != Q_NULLPTR)
{
port->close();
delete port;

Wyświetl plik

@ -53,7 +53,7 @@ private:
unsigned char buffer[256];
QString portName;
QSerialPort* port;
QSerialPort* port = Q_NULLPTR;
qint32 baudRate;
unsigned char stopBits;
bool rolledBack;