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>
This commit is contained in:
Shane Kearns 2012-01-30 14:35:12 +00:00 committed by Qt by Nokia
parent e889d61380
commit 064a2316b0

View File

@ -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