Fix potential memory leak due to QMovie not being parented to anything
This commit is contained in:
parent
132bf9b9d9
commit
97ea1a6ad4
@ -11,7 +11,7 @@ AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app, bool make_static) : Q
|
|||||||
is_static = make_static;
|
is_static = make_static;
|
||||||
if (!is_static) // Only create the QMovie if we're non-static
|
if (!is_static) // Only create the QMovie if we're non-static
|
||||||
{
|
{
|
||||||
movie = new QMovie();
|
movie = new QMovie(this);
|
||||||
connect(movie, &QMovie::frameChanged, [=]{
|
connect(movie, &QMovie::frameChanged, [=]{
|
||||||
QPixmap f_pixmap = movie->currentPixmap();
|
QPixmap f_pixmap = movie->currentPixmap();
|
||||||
f_pixmap =
|
f_pixmap =
|
||||||
|
Loading…
Reference in New Issue
Block a user