From 051f7e20cfe74bc3ff5497b18c51eabd4ed071dd Mon Sep 17 00:00:00 2001 From: Martin Petersson Date: Wed, 16 May 2012 09:35:23 +0200 Subject: qhttpthreaddelegate: check that we have a reply set when reading. Make sure that we always have a reply set when we try to read. Change-Id: Icedf4190f3a4f0727e9f415c41cb6041fe5f7604 Reviewed-by: Prasanth Ullattil --- src/network/access/qhttpthreaddelegate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp index d120373..adfe14e 100644 --- a/src/network/access/qhttpthreaddelegate.cpp +++ b/src/network/access/qhttpthreaddelegate.cpp @@ -374,6 +374,9 @@ void QHttpThreadDelegate::readBufferFreed(qint64 size) void QHttpThreadDelegate::readyReadSlot() { + if (!httpReply) + return; + // Don't do in zerocopy case if (!downloadBuffer.isNull()) return; -- cgit v0.12