mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix memory leak of animated image textures
This commit is contained in:
parent
374ad0a816
commit
7645ab1736
1 changed files with 3 additions and 1 deletions
|
@ -152,8 +152,10 @@ MxcAnimatedImage::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeD
|
||||||
|
|
||||||
imageDirty = false;
|
imageDirty = false;
|
||||||
QSGImageNode *n = static_cast<QSGImageNode *>(oldNode);
|
QSGImageNode *n = static_cast<QSGImageNode *>(oldNode);
|
||||||
if (!n)
|
if (!n) {
|
||||||
n = window()->createImageNode();
|
n = window()->createImageNode();
|
||||||
|
n->setOwnsTexture(true);
|
||||||
|
}
|
||||||
|
|
||||||
// n->setTexture(nullptr);
|
// n->setTexture(nullptr);
|
||||||
auto img = movie.currentImage();
|
auto img = movie.currentImage();
|
||||||
|
|
Loading…
Reference in a new issue