summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-13 13:52:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-13 13:52:48 (GMT)
commit186c59d34b4e35018850570719f3a9c553f391e0 (patch)
treed200224a172ed9d0d5c2a2e51e0ed553c1b0f57b /src/network/access
parent2914a47085a30b9f3eaed7d7919a2830ad886f23 (diff)
parent20689ba77501c6c91d3db78f81f7ce64e7d15b95 (diff)
downloadQt-186c59d34b4e35018850570719f3a9c553f391e0.zip
Qt-186c59d34b4e35018850570719f3a9c553f391e0.tar.gz
Qt-186c59d34b4e35018850570719f3a9c553f391e0.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QNAM HTTP: Preemptive anti crash if() statement QNAM HTTP: More testcases
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qhttpnetworkreply.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 338236e..108ba8a 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -179,6 +179,9 @@ qint64 QHttpNetworkReply::bytesAvailableNextBlock() const
QByteArray QHttpNetworkReply::readAny()
{
Q_D(QHttpNetworkReply);
+ if (d->responseData.bufferCount() == 0)
+ return QByteArray();
+
// we'll take the last buffer, so schedule another read from http
if (d->downstreamLimited && d->responseData.bufferCount() == 1)
d->connection->d_func()->readMoreLater(this);