From 35804feb8272a8f6a9e6003787d88fe915575b12 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 24 Aug 2013 07:57:52 +0000 Subject: fixed warnings git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3655 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playstate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qmmpui/playstate.cpp') 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; -- cgit v1.2.3-13-gbd6f