aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/playstate.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-08-24 07:57:52 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-08-24 07:57:52 +0000
commit35804feb8272a8f6a9e6003787d88fe915575b12 (patch)
tree5dd5b18363185ae774c6f34504e5da545c377467 /src/qmmpui/playstate.cpp
parent0d48ae801429d3513e26ad322489d04a9c83e197 (diff)
downloadqmmp-35804feb8272a8f6a9e6003787d88fe915575b12.tar.gz
qmmp-35804feb8272a8f6a9e6003787d88fe915575b12.tar.bz2
qmmp-35804feb8272a8f6a9e6003787d88fe915575b12.zip
fixed warnings
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3655 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playstate.cpp')
-rw-r--r--src/qmmpui/playstate.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qmmpui/playstate.cpp b/src/qmmpui/playstate.cpp
index 1cd44b72d..f16f4c85c 100644
--- a/src/qmmpui/playstate.cpp
+++ b/src/qmmpui/playstate.cpp
@@ -120,7 +120,9 @@ bool NormalPlayState::next()
return false;
}
- if(m_model->track((m_model->currentIndex() + 1)))
+ if(m_model->currentIndex() + 1 >= m_model->count())
+ return false;
+ else if(m_model->track((m_model->currentIndex() + 1)))
return m_model->setCurrent(m_model->currentIndex() + 1);
else if(m_model->currentIndex() + 2 > m_model->count() - 1)
return false;