Skip to content
Snippets Groups Projects
Verified Commit fc7df50d authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix another leak when creating an animated image without an image

parent b5b580fd
No related branches found
No related tags found
No related merge requests found
......@@ -155,14 +155,19 @@ MxcAnimatedImage::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeD
if (!n) {
n = window()->createImageNode();
n->setOwnsTexture(true);
// n->setFlags(QSGNode::OwnedByParent | QSGNode::OwnsGeometry |
// GSGNode::OwnsMaterial);
n->setFlags(QSGNode::OwnedByParent);
}
// n->setTexture(nullptr);
auto img = movie.currentImage();
if (!img.isNull())
n->setTexture(window()->createTextureFromImage(img));
else
else {
delete n;
return nullptr;
}
n->setSourceRect(img.rect());
n->setRect(QRect(0, 0, width(), height()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment