playPauseButton doesn't always exist, crash--

svn path=/trunk/KDE/kdelibs/; revision=1002603
This commit is contained in:
Marco Martin 2009-07-26 14:23:29 +00:00
parent a3a97eec7d
commit 9e278bbe78

View File

@ -162,10 +162,12 @@ void VideoWidgetPrivate::stateChanged(Phonon::State newState, Phonon::State oldS
{ {
Q_UNUSED(oldState) Q_UNUSED(oldState)
if (newState == Phonon::PlayingState) { if (playPauseButton) {
playPauseButton->setIcon("media-playback-pause"); if (newState == Phonon::PlayingState) {
} else { playPauseButton->setIcon("media-playback-pause");
playPauseButton->setIcon("media-playback-start"); } else {
playPauseButton->setIcon("media-playback-start");
}
} }
} }