From f4c0ea2554253bf5055be61e8f94078227b07298 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 4 May 2017 16:32:56 +0300 Subject: Software: Fix leaking of SGTextures Task-number: QTBUG-59865 Change-Id: I18911734b34e535c2c77d5a860bd776105617663 Reviewed-by: Laszlo Agocs --- src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; } -- cgit v1.2.3