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

Qt: DO NOT use qobject_cast without checking it!

How difficult is that?
Fix crash introduced by 1a4bb059
parent 4be112d1
...@@ -183,7 +183,10 @@ void SoundWidget::updateMuteStatus() ...@@ -183,7 +183,10 @@ void SoundWidget::updateMuteStatus()
playlist_t *p_playlist = pl_Hold( p_intf ); playlist_t *p_playlist = pl_Hold( p_intf );
b_is_muted = aout_IsMuted( VLC_OBJECT(p_playlist) ); b_is_muted = aout_IsMuted( VLC_OBJECT(p_playlist) );
pl_Release( p_intf ); pl_Release( p_intf );
(qobject_cast<SoundSlider *>(volumeSlider))->setMuted( b_is_muted );
SoundSlider *soundSlider = qobject_cast<SoundSlider *>(volumeSlider);
if( soundSlider )
soundSlider->setMuted( b_is_muted );
refreshLabels(); refreshLabels();
} }
......
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