Fix memory leak of animated image textures

pull/707/head
Nicolas Werner 3 years ago
parent 374ad0a816
commit 7645ab1736
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      src/ui/MxcAnimatedImage.cpp

@ -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…
Cancel
Save