From 97ea1a6ad419790279d1730bf33b740c66269f73 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Mon, 19 Apr 2021 23:11:17 +0300 Subject: [PATCH] Fix potential memory leak due to QMovie not being parented to anything --- src/aoimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aoimage.cpp b/src/aoimage.cpp index 6f1b84f..656528e 100644 --- a/src/aoimage.cpp +++ b/src/aoimage.cpp @@ -11,7 +11,7 @@ AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app, bool make_static) : Q is_static = make_static; if (!is_static) // Only create the QMovie if we're non-static { - movie = new QMovie(); + movie = new QMovie(this); connect(movie, &QMovie::frameChanged, [=]{ QPixmap f_pixmap = movie->currentPixmap(); f_pixmap =