Mercurial > retraceit
diff src/pngplayer.cpp @ 103:43af5fccf61e
Fix possible double free on exit
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 18 Nov 2016 12:47:21 +0100 |
parents | 73e6b6b12412 |
children |
line wrap: on
line diff
--- a/src/pngplayer.cpp Fri Nov 18 12:47:11 2016 +0100 +++ b/src/pngplayer.cpp Fri Nov 18 12:47:21 2016 +0100 @@ -225,12 +225,5 @@ } void PNGPlayer::close() { - QVBoxLayout *baseLayout = qobject_cast<QVBoxLayout*>(layout()); - if (!baseLayout) { - qWarning() << "Wrong layout!"; - return; - } - if (baseLayout->indexOf(mPNGLabel) == -1) { - delete mPNGLabel; - } + QWidget::close(); }