diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-08-29 18:38:11 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-08-29 18:38:11 +0200 |
commit | 7645ab1736d46703bbb0740a995ba0f4af8c33df (patch) | |
tree | b223a7d1912dfeee3d5262921284ad2192d0ee10 /src/ui | |
parent | Small image pack editor improvements (diff) | |
download | nheko-7645ab1736d46703bbb0740a995ba0f4af8c33df.tar.xz |
Fix memory leak of animated image textures
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/MxcAnimatedImage.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/MxcAnimatedImage.cpp b/src/ui/MxcAnimatedImage.cpp index 3c93cc2b..3db5ef60 100644 --- a/src/ui/MxcAnimatedImage.cpp +++ b/src/ui/MxcAnimatedImage.cpp @@ -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(); |