forked from qt-creator/qt-creator
Debugger: Fix Segmentation Fault on Windows
This amends 035b8aa5f7. shutdown() is
called from GdbEngine and from OutputColloector's Dtor. Thus there is a
change we access m_socket, after it is nullified.
Change-Id: I7d26ded70d0b148d83eb551edaf9b82850db197e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Björn Schäpers
parent
1652be1310
commit
48ce753a05
@@ -156,7 +156,8 @@ void OutputCollector::newConnectionAvailable()
|
|||||||
void OutputCollector::bytesAvailable()
|
void OutputCollector::bytesAvailable()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
emit byteDelivery(m_socket->readAll());
|
if (m_socket)
|
||||||
|
emit byteDelivery(m_socket->readAll());
|
||||||
#else
|
#else
|
||||||
size_t nbytes = 0;
|
size_t nbytes = 0;
|
||||||
if (::ioctl(m_serverFd, FIONREAD, (char *) &nbytes) < 0)
|
if (::ioctl(m_serverFd, FIONREAD, (char *) &nbytes) < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user