summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/access/qnetworkreplyhttpimpl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
index bdb23ede1d..fec3b0a100 100644
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
@@ -1883,6 +1883,12 @@ void QNetworkReplyHttpImplPrivate::_q_cacheLoadReadyRead()
totalSize.isNull() ? Q_INT64_C(-1) : totalSize.toLongLong());
}
}
+
+ // A signal we've emitted might be handled by a slot that aborts,
+ // so we need to check for that and bail out if it's happened:
+ if (!q->isOpen())
+ return;
+
// If there are still bytes available in the cacheLoadDevice then the user did not read
// in response to the readyRead() signal. This means we have to load from the cacheLoadDevice
// and buffer that stuff. This is needed to be able to properly emit finished() later.