-rw-r--r-- | noncore/multimedia/opieplayer3/playlist.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer3/playlist.cpp b/noncore/multimedia/opieplayer3/playlist.cpp index 6f2e668..fe2dde3 100644 --- a/noncore/multimedia/opieplayer3/playlist.cpp +++ b/noncore/multimedia/opieplayer3/playlist.cpp | |||
@@ -163,7 +163,11 @@ void PlaylistView::addFile(const QString&aFile,const QString&aName) | |||
163 | QMessageBox::warning(0,tr("Error reading fileheader"),msg); | 163 | QMessageBox::warning(0,tr("Error reading fileheader"),msg); |
164 | return; | 164 | return; |
165 | } | 165 | } |
166 | m_lastItem = m_items.last(); | 166 | if (m_items.count()>0) { |
167 | m_lastItem = m_items.last(); | ||
168 | } else { | ||
169 | m_lastItem = 0; | ||
170 | } | ||
167 | PlaylistItem*_it = currentItem(); | 171 | PlaylistItem*_it = currentItem(); |
168 | 172 | ||
169 | if (m_lastItem) { | 173 | if (m_lastItem) { |