diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-01 06:59:17 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-04-01 06:59:17 +0000 |
commit | 810b6a5cd420ccaf99cecfe43c8751344f864280 (patch) | |
tree | bcabff5652a5efc881be58035750206ace1f25c1 /src/quick/util | |
parent | fd565ec6073c7e09cd76f23817ed940b73ef240f (diff) | |
parent | 92dcf9e69e5ed42471d4e02eb165bc80f550129e (diff) |
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Diffstat (limited to 'src/quick/util')
-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 |