summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/demos/mediaplayer/MediaPlayer/PlaylistInfo.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/demos/mediaplayer/MediaPlayer/PlaylistInfo.qml b/examples/demos/mediaplayer/MediaPlayer/PlaylistInfo.qml
index 24013a2fe..cae1efd3d 100644
--- a/examples/demos/mediaplayer/MediaPlayer/PlaylistInfo.qml
+++ b/examples/demos/mediaplayer/MediaPlayer/PlaylistInfo.qml
@@ -26,7 +26,7 @@ Rectangle {
signal currentFileRemoved()
function getSource() {
- if (isShuffled) {
+ if (isShuffled && mediaCount > 1) {
let randomIndex = Math.floor(Math.random() * mediaCount)
while (randomIndex == currentIndex) {
randomIndex = Math.floor(Math.random() * mediaCount)