aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickpixmapcache.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-03-31 15:45:45 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-03-31 15:45:46 +0200
commit92dcf9e69e5ed42471d4e02eb165bc80f550129e (patch)
treefcb56709e15991d40de4ef695ac27831cb062a38 /src/quick/util/qquickpixmapcache.cpp
parent03fa9780fa1ac8bab10f99a59dd3fc2f8f878222 (diff)
parent22b7fd1c0b93f12585858ac5baabba32408749fd (diff)
Merge remote-tracking branch 'origin/5.4' into 5.5
Diffstat (limited to 'src/quick/util/qquickpixmapcache.cpp')
-rw-r--r--src/quick/util/qquickpixmapcache.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp
index 2066d1e405..5199808251 100644
--- a/src/quick/util/qquickpixmapcache.cpp
+++ b/src/quick/util/qquickpixmapcache.cpp
@@ -526,10 +526,12 @@ void QQuickPixmapReader::processJobs()
for (int i = 0; i < cancelled.count(); ++i) {
QQuickPixmapReply *job = cancelled.at(i);
QNetworkReply *reply = replies.key(job, 0);
- if (reply && reply->isRunning()) {
- // cancel any jobs already started
+ if (reply) {
replies.remove(reply);
- reply->close();
+ if (reply->isRunning()) {
+ // cancel any jobs already started
+ reply->close();
+ }
}
PIXMAP_PROFILE(pixmapStateChanged<QQuickProfiler::PixmapLoadingError>(job->url));
// deleteLater, since not owned by this thread