diff options
author | Arnaud Vrac <avrac@freebox.fr> | 2017-04-27 18:56:02 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2017-05-05 07:46:28 +0000 |
commit | 7bf3f99ceca5818596c7dd03d6053ea40aa262b3 (patch) | |
tree | 679b663dc5082dce1c23b966f6c3d760a288559c /src/quick/util | |
parent | f4c0ea2554253bf5055be61e8f94078227b07298 (diff) |
qquickpixmapcache: fix crash when loading images asynchronously
Use copied data instead of data that might be destroyed. This was
already fixed in most places in commit 22c39eda8ab316c.
Change-Id: Ie31ebb2e53945dd66ce3d0114629c284407ff26c
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/quick/util')
-rw-r--r-- | src/quick/util/qquickpixmapcache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index 402897ca7a..882482ad31 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -497,7 +497,7 @@ void QQuickPixmapReader::networkRequestDone(QNetworkReply *reply) QByteArray all = reply->readAll(); QBuffer buff(&all); buff.open(QIODevice::ReadOnly); - if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, job->requestSize, job->data->providerOptions)) + if (!readImage(reply->url(), &buff, &image, &errorString, &readSize, job->requestSize, job->providerOptions)) error = QQuickPixmapReply::Decoding; } // send completion event to the QQuickPixmapReply |