diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/serialport/blockingmaster/masterthread.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/serialport/blockingmaster/masterthread.cpp b/examples/serialport/blockingmaster/masterthread.cpp index 12d23bbd..25aa8489 100644 --- a/examples/serialport/blockingmaster/masterthread.cpp +++ b/examples/serialport/blockingmaster/masterthread.cpp @@ -104,6 +104,11 @@ void MasterThread::run() //! [5] //! [6] QSerialPort serial; + if (currentPortName.isEmpty()) { + emit error(tr("No port name specified")); + return; + } + while (!m_quit) { //![6] //! [7] if (currentPortNameChanged) { |