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