From 72a05626b5420d230d4194b924e0a89246e0d6b5 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 3 Jul 2015 11:38:50 +0200 Subject: [PATCH] Do not leak the texture factory for cancelled jobs Change-Id: Ie18e019402857acd17203681d45adaf32be54fcc Reviewed-by: Gunnar Sletta --- src/quick/util/qquickpixmapcache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index f65e54418..6f6e91ec9 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -513,6 +513,8 @@ void QQuickPixmapReader::asyncResponseFinished(QQuickImageResponse *response) mutex.lock(); if (!cancelled.contains(job)) job->postReply(error, errorString, t ? t->textureSize() : QSize(), t); + else + delete t; mutex.unlock(); } response->deleteLater(); -- 2.34.1