aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickpixmapcache.cpp
diff options
context:
space:
mode:
authorAlbert Astals Cid <albert.astals@canonical.com>2015-07-03 11:38:50 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-14 11:35:06 +0000
commit72a05626b5420d230d4194b924e0a89246e0d6b5 (patch)
tree65f67016caae7256dd70e88bc02c5f95831e14ac /src/quick/util/qquickpixmapcache.cpp
parente44843bfc8fc8bfd5c987fde08816ec3d81f0cae (diff)
Do not leak the texture factory for cancelled jobs
Change-Id: Ie18e019402857acd17203681d45adaf32be54fcc Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/util/qquickpixmapcache.cpp')
-rw-r--r--src/quick/util/qquickpixmapcache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp
index f65e544183..6f6e91ec99 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();