Do not leak the texture factory for cancelled jobs
authorAlbert Astals Cid <albert.astals@canonical.com>
Fri, 3 Jul 2015 09:38:50 +0000 (11:38 +0200)
committerSimon Hausmann <simon.hausmann@theqtcompany.com>
Tue, 14 Jul 2015 11:35:06 +0000 (11:35 +0000)
Change-Id: Ie18e019402857acd17203681d45adaf32be54fcc
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
src/quick/util/qquickpixmapcache.cpp

index f65e544..6f6e91e 100644 (file)
@@ -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();