summaryrefslogtreecommitdiffstats
path: root/examples/phonon
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-08-03 23:00:23 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-08-03 23:00:23 (GMT)
commit897014a47b41dcf2b9d91549be9b96890d5291c7 (patch)
tree91da900adb42122eebdef573c012051ea511e42d /examples/phonon
parent37cdd053623bfadded77ba6ad34e0d4c45158cc7 (diff)
parent2076f150995e541308b1d8da936b3e12ab68b886 (diff)
downloadQt-897014a47b41dcf2b9d91549be9b96890d5291c7.zip
Qt-897014a47b41dcf2b9d91549be9b96890d5291c7.tar.gz
Qt-897014a47b41dcf2b9d91549be9b96890d5291c7.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'examples/phonon')
-rw-r--r--examples/phonon/musicplayer/mainwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/phonon/musicplayer/mainwindow.cpp b/examples/phonon/musicplayer/mainwindow.cpp
index 7ec86ecf..c3cc5d5 100644
--- a/examples/phonon/musicplayer/mainwindow.cpp
+++ b/examples/phonon/musicplayer/mainwindow.cpp
@@ -157,9 +157,12 @@ void MainWindow::tableClicked(int row, int /* column */)
mediaObject->stop();
mediaObject->clearQueue();
+ if (row >= sources.size())
+ return;
+
mediaObject->setCurrentSource(sources[row]);
- if (wasPlaying)
+ if (wasPlaying)
mediaObject->play();
else
mediaObject->stop();