Fix potential memory leak due to QMovie not being parented to anything

This commit is contained in:
Crystalwarrior 2021-04-19 23:11:17 +03:00
parent 132bf9b9d9
commit 97ea1a6ad4

View File

@ -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 =