diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2010-09-28 10:24:55 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2010-09-28 10:37:33 (GMT) |
commit | 30959e88498b2c8591145e30c8b497a76c12d8f6 (patch) | |
tree | 6385ec8acc600a99d87575bb345ea6cec5a8be6f /src/declarative/debugger | |
parent | 3b05cb4597df0f8b2c09cae5e4bb8766caaaf653 (diff) | |
download | Qt-30959e88498b2c8591145e30c8b497a76c12d8f6.zip Qt-30959e88498b2c8591145e30c8b497a76c12d8f6.tar.gz Qt-30959e88498b2c8591145e30c8b497a76c12d8f6.tar.bz2 |
QmlDebugService: Check that there is a receiver before sending messages
Reviewed-by: Christiaan Janssen
Diffstat (limited to 'src/declarative/debugger')
-rw-r--r-- | src/declarative/debugger/qdeclarativedebugservice.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index 0fbc1e3..62f2f39 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -182,7 +182,9 @@ void QDeclarativeDebugServer::newConnection() bool QDeclarativeDebugServer::hasDebuggingClient() const { Q_D(const QDeclarativeDebugServer); - return d->gotHello; + return d->connection + && (d->connection->state() == QTcpSocket::ConnectedState) + && d->gotHello; } QDeclarativeDebugServer *QDeclarativeDebugServer::instance() @@ -485,7 +487,7 @@ void QDeclarativeDebugService::sendMessage(const QByteArray &message) { Q_D(QDeclarativeDebugService); - if (!d->server || !d->server->d_func()->connection) + if (status() != Enabled) return; QPacket pack; |