summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/qt/src/http_file_source.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/qt/src/http_file_source.cpp b/platform/qt/src/http_file_source.cpp
index 90abdd0aa3..f4fb0749a6 100644
--- a/platform/qt/src/http_file_source.cpp
+++ b/platform/qt/src/http_file_source.cpp
@@ -75,8 +75,12 @@ void HTTPFileSource::Impl::onReplyFinished()
QByteArray data = reply->readAll();
QVector<HTTPRequest*>& requestsVector = it.value().second;
- for (auto req : requestsVector) {
- req->handleNetworkReply(reply, data);
+
+ // Cannot use the iterator to walk the requestsVector
+ // because calling handleNetworkReply() might get
+ // requests added to the requestsVector.
+ while (!requestsVector.isEmpty()) {
+ requestsVector.takeFirst()->handleNetworkReply(reply, data);
}
m_pending.erase(it);