Fix memory leak of animated image textures

This commit is contained in:
Nicolas Werner 2021-08-29 18:38:11 +02:00
parent 374ad0a816
commit 7645ab1736
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
1 changed files with 3 additions and 1 deletions

View File

@ -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();