Fix memory leak of animated image textures
This commit is contained in:
parent
374ad0a816
commit
7645ab1736
@ -152,8 +152,10 @@ MxcAnimatedImage::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeD
|
||||
|
||||
imageDirty = false;
|
||||
QSGImageNode *n = static_cast<QSGImageNode *>(oldNode);
|
||||
if (!n)
|
||||
if (!n) {
|
||||
n = window()->createImageNode();
|
||||
n->setOwnsTexture(true);
|
||||
}
|
||||
|
||||
// n->setTexture(nullptr);
|
||||
auto img = movie.currentImage();
|
||||
|
Loading…
Reference in New Issue
Block a user