summary refs log tree commit diff
path: root/src/ui
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-08-29 18:38:11 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-08-29 18:38:11 +0200
commit7645ab1736d46703bbb0740a995ba0f4af8c33df (patch)
treeb223a7d1912dfeee3d5262921284ad2192d0ee10 /src/ui
parentSmall image pack editor improvements (diff)
downloadnheko-7645ab1736d46703bbb0740a995ba0f4af8c33df.tar.xz
Fix memory leak of animated image textures
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/MxcAnimatedImage.cpp4
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();