Fixed bug #1022038 where clicking next track after the last track has finished throws an exception.

bzr-revno: 2044
Fixes: https://launchpad.net/bugs/1022038
This commit is contained in:
Philip Ridout 2012-08-13 10:38:35 +02:00 committed by Andreas Preikschat
commit d7d6c07870
1 changed files with 1 additions and 1 deletions

View File

@ -580,7 +580,7 @@ class AudioPlayer(QtCore.QObject):
self.playlist.extend(map(Phonon.MediaSource, filenames))
def next(self):
if not self.repeat and self.currentIndex + 1 == len(self.playlist):
if not self.repeat and self.currentIndex + 1 >= len(self.playlist):
return
isPlaying = self.mediaObject.state() == Phonon.PlayingState
self.currentIndex += 1