Commit ffd82479 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix possible double-free on quit with simple volume widget

parent 8e8f6a5f
...@@ -71,7 +71,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf, ...@@ -71,7 +71,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
/* Special view, click on button shows the slider */ /* Special view, click on button shows the slider */
b_shiny = false; b_shiny = false;
volumeControlWidget = new QFrame; volumeControlWidget = new QFrame( this );
subLayout = new QVBoxLayout( volumeControlWidget ); subLayout = new QVBoxLayout( volumeControlWidget );
subLayout->setContentsMargins( 4, 4, 4, 4 ); subLayout->setContentsMargins( 4, 4, 4, 4 );
volumeMenu = new QMenu( this ); volumeMenu = new QMenu( this );
...@@ -122,12 +122,6 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf, ...@@ -122,12 +122,6 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
CONNECT( THEMIM, soundMuteChanged( bool ), this, updateMuteStatus( bool ) ); CONNECT( THEMIM, soundMuteChanged( bool ), this, updateMuteStatus( bool ) );
} }
SoundWidget::~SoundWidget()
{
delete volumeSlider;
delete volumeControlWidget;
}
void SoundWidget::refreshLabels() void SoundWidget::refreshLabels()
{ {
int i_sliderVolume = volumeSlider->value(); int i_sliderVolume = volumeSlider->value();
......
...@@ -99,7 +99,6 @@ class SoundWidget : public QWidget ...@@ -99,7 +99,6 @@ class SoundWidget : public QWidget
public: public:
SoundWidget( QWidget *parent, intf_thread_t *_p_i, bool, SoundWidget( QWidget *parent, intf_thread_t *_p_i, bool,
bool b_special = false ); bool b_special = false );
virtual ~SoundWidget();
void setMuted( bool ); void setMuted( bool );
protected: protected:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment