summaryrefslogtreecommitdiffstats
path: root/src/network/socket
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-01-30 14:35:12 +0000
committerQt by Nokia <qt-info@nokia.com>2012-01-30 20:18:44 +0100
commit064a2316b088a0ebdd4100e94cc16a5446eb2769 (patch)
treebfb517fb41e800ab20af53650f6b3626ff2f1a98 /src/network/socket
parente889d61380cbb47e29ccd75d712a4b4a66031899 (diff)
Fix crashing debug message
The debug message could derefence a null pointer, this crashed when running ssl autotests Change-Id: I176aaa9f3cf3c6cc1512cdc34db06d4c79f92e73 Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/socket')
-rw-r--r--src/network/socket/qabstractsocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 6264ee4c21..b6d0733f6d 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -811,7 +811,7 @@ bool QAbstractSocketPrivate::flush()
&& socketEngine->bytesToWrite() == 0)) {
#if defined (QABSTRACTSOCKET_DEBUG)
qDebug("QAbstractSocketPrivate::flush() nothing to do: valid ? %s, writeBuffer.isEmpty() ? %s",
- socketEngine->isValid() ? "yes" : "no", writeBuffer.isEmpty() ? "yes" : "no");
+ (socketEngine && socketEngine->isValid()) ? "yes" : "no", writeBuffer.isEmpty() ? "yes" : "no");
#endif
// this covers the case when the buffer was empty, but we had to wait for the socket engine to finish