diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2011-02-23 15:33:24 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2011-02-23 15:37:50 (GMT) |
commit | fb5f1c4e83d0c1af1dba5644bcafe828a14df898 (patch) | |
tree | 590ef208e567e58170146cde4a0b627c0ef8d766 | |
parent | b51f4fdb16c4a273646ad7722a9abc7998210c9f (diff) | |
download | Qt-fb5f1c4e83d0c1af1dba5644bcafe828a14df898.zip Qt-fb5f1c4e83d0c1af1dba5644bcafe828a14df898.tar.gz Qt-fb5f1c4e83d0c1af1dba5644bcafe828a14df898.tar.bz2 |
QNAM HTTP: Add qWarning() for double-finished() bug
Proper bugfix will come with later commit.
-rw-r--r-- | src/network/access/qhttpthreaddelegate.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index 16c6c0c..b5cf00a 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -325,6 +325,11 @@ void QHttpThreadDelegate::readyReadSlot() void QHttpThreadDelegate::finishedSlot() { + if (!httpReply) { + qWarning() << "QHttpThreadDelegate::finishedSlot: HTTP reply had already been deleted, internal problem. Please report."; + return; + } + // If there is still some data left emit that now while (httpReply->readAnyAvailable()) { pendingDownloadData->fetchAndAddRelease(1); @@ -370,6 +375,11 @@ void QHttpThreadDelegate::synchronousFinishedSlot() void QHttpThreadDelegate::finishedWithErrorSlot(QNetworkReply::NetworkError errorCode, const QString &detail) { + if (!httpReply) { + qWarning() << "QHttpThreadDelegate::finishedWithErrorSlot: HTTP reply had already been deleted, internal problem. Please report."; + return; + } + #ifndef QT_NO_OPENSSL if (ssl) emit sslConfigurationChanged(httpReply->sslConfiguration()); |