From 7bf3f99ceca5818596c7dd03d6053ea40aa262b3 Mon Sep 17 00:00:00 2001 From: Arnaud Vrac Date: Thu, 27 Apr 2017 18:56:02 +0200 Subject: 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 Reviewed-by: Shawn Rutledge Reviewed-by: Robin Burchell --- src/quick/util/qquickpixmapcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/util') 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 -- cgit v1.2.3