[vlc-commits] Qt: fix possible double-free on quit with simple volume widget
Jean-Baptiste Kempf
git at videolan.org
Mon Dec 30 19:20:39 CET 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Dec 30 19:20:03 2013 +0100| [ffd82479f6e3282bd9c8635ee775cd3a9094f176] | committer: Jean-Baptiste Kempf
Qt: fix possible double-free on quit with simple volume widget
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ffd82479f6e3282bd9c8635ee775cd3a9094f176
---
modules/gui/qt4/components/controller_widget.cpp | 8 +-------
modules/gui/qt4/components/controller_widget.hpp | 1 -
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/modules/gui/qt4/components/controller_widget.cpp b/modules/gui/qt4/components/controller_widget.cpp
index aad30a2..66fecd9 100644
--- a/modules/gui/qt4/components/controller_widget.cpp
+++ b/modules/gui/qt4/components/controller_widget.cpp
@@ -71,7 +71,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
/* Special view, click on button shows the slider */
b_shiny = false;
- volumeControlWidget = new QFrame;
+ volumeControlWidget = new QFrame( this );
subLayout = new QVBoxLayout( volumeControlWidget );
subLayout->setContentsMargins( 4, 4, 4, 4 );
volumeMenu = new QMenu( this );
@@ -122,12 +122,6 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
CONNECT( THEMIM, soundMuteChanged( bool ), this, updateMuteStatus( bool ) );
}
-SoundWidget::~SoundWidget()
-{
- delete volumeSlider;
- delete volumeControlWidget;
-}
-
void SoundWidget::refreshLabels()
{
int i_sliderVolume = volumeSlider->value();
diff --git a/modules/gui/qt4/components/controller_widget.hpp b/modules/gui/qt4/components/controller_widget.hpp
index 48a6d96..3633eaa 100644
--- a/modules/gui/qt4/components/controller_widget.hpp
+++ b/modules/gui/qt4/components/controller_widget.hpp
@@ -99,7 +99,6 @@ class SoundWidget : public QWidget
public:
SoundWidget( QWidget *parent, intf_thread_t *_p_i, bool,
bool b_special = false );
- virtual ~SoundWidget();
void setMuted( bool );
protected:
More information about the vlc-commits
mailing list