diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-31 15:45:45 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-03-31 15:45:46 +0200 |
commit | 92dcf9e69e5ed42471d4e02eb165bc80f550129e (patch) | |
tree | fcb56709e15991d40de4ef695ac27831cb062a38 /src/quick/util/qquickpixmapcache.cpp | |
parent | 03fa9780fa1ac8bab10f99a59dd3fc2f8f878222 (diff) | |
parent | 22b7fd1c0b93f12585858ac5baabba32408749fd (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: I54e66e992f5e5d441b8b5394e7a03ec5352e7bf3
Diffstat (limited to 'src/quick/util/qquickpixmapcache.cpp')
-rw-r--r-- | src/quick/util/qquickpixmapcache.cpp | 8 |
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 |