aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/playlistmanager.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-09-05 06:09:31 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2016-09-05 06:09:31 +0000
commitd894be75f42dead336c4ac591d98ff1b91474368 (patch)
tree253c2b063b1806878eec78a933e2958dc1d9d558 /src/qmmpui/playlistmanager.cpp
parent51e432cbb803745f905ca39c96834a3e5bdf52c0 (diff)
downloadqmmp-d894be75f42dead336c4ac591d98ff1b91474368.tar.gz
qmmp-d894be75f42dead336c4ac591d98ff1b91474368.tar.bz2
qmmp-d894be75f42dead336c4ac591d98ff1b91474368.zip
fixed 'index out of range' warning
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6710 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistmanager.cpp')
-rw-r--r--src/qmmpui/playlistmanager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qmmpui/playlistmanager.cpp b/src/qmmpui/playlistmanager.cpp
index 26a3c828c..524a7e2fd 100644
--- a/src/qmmpui/playlistmanager.cpp
+++ b/src/qmmpui/playlistmanager.cpp
@@ -338,6 +338,8 @@ void PlayListManager::writePlayLists()
tmpFile.write(QString("current_playlist=%1\n").arg(m_models.indexOf(m_current)).toUtf8());
foreach(PlayListModel *model, m_models)
{
+ if(model->isEmpty())
+ continue;
QList<PlayListItem *> items = model->items();
tmpFile.write(QString("playlist=%1\n").arg(model->name()).toUtf8());
tmpFile.write(QString("current=%1\n").arg(model->indexOfTrack(model->currentIndex())).toUtf8());