Skip to content

Commit 972f21b

Browse files
committed
Fixed using of uninitialised serial port in destractors
1 parent d3e7e38 commit 972f21b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

qt/reader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Reader : public QObject
1515

1616
static const uint32_t bufSize = 4096;
1717

18-
SerialPort *serialPort;
18+
SerialPort *serialPort = nullptr;
1919
QString portName;
2020
qint32 baudRate;
2121
uint8_t *rbuf;

qt/writer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Writer : public QObject
1616

1717
static const uint32_t bufSize = 64;
1818

19-
SerialPort *serialPort;
19+
SerialPort *serialPort = nullptr;
2020
QString portName;
2121
qint32 baudRate;
2222
uint8_t *buf;

0 commit comments

Comments
 (0)