aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/visualizations/XBMCProjectM/Main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xbmc/visualizations/XBMCProjectM/Main.cpp b/xbmc/visualizations/XBMCProjectM/Main.cpp
index 767aeba961..50492d88ae 100644
--- a/xbmc/visualizations/XBMCProjectM/Main.cpp
+++ b/xbmc/visualizations/XBMCProjectM/Main.cpp
@@ -363,7 +363,8 @@ bool InitProjectM()
else
{
//If it is the first run or a newly chosen preset pack we choose a random preset as first
- globalPM->selectPreset((rand() % (globalPM->getPlaylistSize())));
+ if (globalPM->getPlaylistSize())
+ globalPM->selectPreset((rand() % (globalPM->getPlaylistSize())));
}
return true;
}