]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/util/customwidgets.hpp
Qt: PixmapAnimator: fix wrong iterator bound
[vlc] / modules / gui / qt4 / util / customwidgets.hpp
index 535161788cc3857cde7256d0911a78a11a3fbc46..e7ccf4643f3c3c5f9ce184244573797808494698 100644 (file)
@@ -116,7 +116,7 @@ public:
     PixmapAnimator( QWidget *parent, QList<QString> _frames );
     void setFps( int _fps ) { fps = _fps; interval = 1000.0 / fps; };
     virtual int duration() const { return interval * pixmaps.count(); };
-    virtual ~PixmapAnimator() { while( pixmaps.count() ) pixmaps.erase( pixmaps.end() ); };
+    virtual ~PixmapAnimator() { qDeleteAll( pixmaps ); };
     QPixmap *getPixmap() { return currentPixmap; }
 protected:
     virtual void updateCurrentTime ( int msecs );