summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-04-19 10:30:03 +0200
committerTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-04-19 13:35:57 +0000
commit3e9ed8ee190bd3a5696e11ef4a566d63da338816 (patch)
treed92070def66bc1485a6f49020cbd23e5e7f01fd6 /src/network
parent0458224743337acef025f53da01beb46eacd4493 (diff)
initializeInflateStream - assert that stream is not null
Coverity is not happy with us testing a pointer (not null) in a couple of places but not in initializeInflateStream. In fact we _always_ test this pointer _before_ calling initializeInflateStream. Anyway, let's make this pre-condition clear by Q_ASSERT()ing it. Change-Id: Ibce99ef6ff1d4e09e3a446a672fa28fc93ab832c Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkreply.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 9476cf8715..24ada3a81f 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -738,6 +738,8 @@ qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QByteDataBuff
#ifndef QT_NO_COMPRESS
int QHttpNetworkReplyPrivate::initializeInflateStream()
{
+ Q_ASSERT(inflateStrm);
+
inflateStrm->zalloc = Z_NULL;
inflateStrm->zfree = Z_NULL;
inflateStrm->opaque = Z_NULL;