QQuickCanvasItem manages the life time of the texture
already, so it shouldn't set the ownsTexture flag on the
QSGSimpleTextureNode, because that would result in a double deletion
when QSGSimpleTextureNode::setTexture() is called.
Change-Id: I7c1cc949b664d1a8b64bab092250439171e66233
Task-number: QTBUG-47714
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
public:
QQuickCanvasNode() {
qsgnode_set_description(this, QStringLiteral("canvasnode"));
- setOwnsTexture(true);
+ setOwnsTexture(false);
+ }
+
+ ~QQuickCanvasNode() {
+ delete texture();
}
};