summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2016-09-09 08:53:20 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2016-09-21 18:58:58 +0000
commitfcd6ac231d160afd5c11cc5ef515dcc61c3eca3f (patch)
tree7c9d3c37f8faaff92fbf7c47993cbf5cb78eed6e /tests
parenta840a9ea5548044c1901f5d4008aaa00553f99d7 (diff)
downloadqtserialport-fcd6ac231d160afd5c11cc5ef515dcc61c3eca3f.tar.gz
Fix crash after closing of ejected device on Linux
When the user calls QSP::close() in a slot which is connected to the QSP::error() signal, then the application is crashed. The reason is that we emit the QSP::error() signal before than we call QRingBuffer::chop() of an internal read buffer, which becomes invalid after the QIODevice::close() called. Therefore, we need just call QRingBuffer::chop() before than the QSP::error() signal will be emitted. Task-number: QTBUG-55847 Change-Id: If536f9cf5cbc1b813d3642bdf9be0867e06368e8 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions