diff options
4 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgspritenode.cpp b/src/plugins/scenegraph/openvg/qsgopenvgspritenode.cpp index fb24df7471..1b75d450aa 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgspritenode.cpp +++ b/src/plugins/scenegraph/openvg/qsgopenvgspritenode.cpp @@ -52,7 +52,7 @@ QSGOpenVGSpriteNode::QSGOpenVGSpriteNode() QSGOpenVGSpriteNode::~QSGOpenVGSpriteNode() { - + delete m_texture; } void QSGOpenVGSpriteNode::setTexture(QSGTexture *texture) diff --git a/src/plugins/scenegraph/openvg/qsgopenvgspritenode.h b/src/plugins/scenegraph/openvg/qsgopenvgspritenode.h index d47b389a0b..dba4e663be 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgspritenode.h +++ b/src/plugins/scenegraph/openvg/qsgopenvgspritenode.h @@ -66,7 +66,7 @@ public: void render() override; private: - QSGOpenVGTexture *m_texture; + QSGOpenVGTexture *m_texture = nullptr; float m_time; QPoint m_sourceA; QPoint m_sourceB; diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode.cpp index d4e5e98d68..17e8bdc2f9 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode.cpp @@ -49,6 +49,11 @@ QSGSoftwareSpriteNode::QSGSoftwareSpriteNode() setGeometry((QSGGeometry*)1); } +QSGSoftwareSpriteNode::~QSGSoftwareSpriteNode() +{ + delete m_texture; +} + void QSGSoftwareSpriteNode::setTexture(QSGTexture *texture) { m_texture = qobject_cast<QSGSoftwarePixmapTexture*>(texture); diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode_p.h index 577a30c051..4015537395 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode_p.h +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode_p.h @@ -64,6 +64,7 @@ class QSGSoftwareSpriteNode : public QSGSpriteNode { public: QSGSoftwareSpriteNode(); + ~QSGSoftwareSpriteNode() override; void setTexture(QSGTexture *texture) override; void setTime(float time) override; @@ -81,7 +82,7 @@ public: private: - QSGSoftwarePixmapTexture *m_texture; + QSGSoftwarePixmapTexture *m_texture = nullptr; float m_time; QPoint m_sourceA; QPoint m_sourceB; |