summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-12-14 10:10:27 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-12-14 15:35:17 +0000
commit243b819ff73f6aaa9dc068d43b8b918a98f53663 (patch)
tree4070b9cb421c4627a7396615ac25a4ce2168d01c
parentf25203296d4e29b5e7e4000950f76045a5a832bd (diff)
Fix QSGTexture* leak in QQuickFramebufferObject
Ownership is not taken by the node. The dtor already destroys the QSGTexture correctly so follow suit when recreating the FBO due to a resize. Task-number: QTBUG-65156 Change-Id: I13a9f0332bf75a4c624ea7dd24633625ca07c8d4 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r--src/quick/items/qquickframebufferobject.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp
index 042ee21aec..20ba067a6b 100644
--- a/src/quick/items/qquickframebufferobject.cpp
+++ b/src/quick/items/qquickframebufferobject.cpp
@@ -313,6 +313,7 @@ QSGNode *QQuickFramebufferObject::updatePaintNode(QSGNode *node, UpdatePaintNode
desiredFboSize *= n->devicePixelRatio;
if (n->fbo && ((d->followsItemSize && n->fbo->size() != desiredFboSize) || n->invalidatePending)) {
+ delete n->texture();
delete n->fbo;
n->fbo = 0;
delete n->msDisplayFbo;