diff options
author | Andy Nichols <andy.nichols@qt.io> | 2017-05-04 16:32:56 +0300 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2017-05-05 04:13:45 +0000 |
commit | f4c0ea2554253bf5055be61e8f94078227b07298 (patch) | |
tree | 517cbf9ab75ccaf36326edc180e039eaf4f4cf8b /src/quick/scenegraph/adaptations | |
parent | 9684b985c25ed7e81c3b1b1000d7767dccd754ce (diff) |
Software: Fix leaking of SGTextures
Task-number: QTBUG-59865
Change-Id: I18911734b34e535c2c77d5a860bd776105617663
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/scenegraph/adaptations')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp index 1fa5234377..384c124a02 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp @@ -74,6 +74,9 @@ QSGSoftwareImageNode::~QSGSoftwareImageNode() void QSGSoftwareImageNode::setTexture(QSGTexture *texture) { + if (m_owns) + delete m_texture; + m_texture = texture; markDirty(DirtyMaterial); m_cachedMirroredPixmapIsDirty = true; } |