summaryrefslogtreecommitdiff
authoralwin <alwin>2005-04-14 23:15:05 (UTC)
committer alwin <alwin>2005-04-14 23:15:05 (UTC)
commit4bf8d42034beee5e28b25182e21cf74f3c2da6a8 (patch) (side-by-side diff)
tree8b882f872f9ddea939722242c229eea46545274b
parent5fd266a3a5a6d9a1acb9c38e4802ff06ba38beaf (diff)
downloadopie-4bf8d42034beee5e28b25182e21cf74f3c2da6a8.zip
opie-4bf8d42034beee5e28b25182e21cf74f3c2da6a8.tar.gz
opie-4bf8d42034beee5e28b25182e21cf74f3c2da6a8.tar.bz2
small fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer3/playlist.cpp6
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)
QMessageBox::warning(0,tr("Error reading fileheader"),msg);
return;
}
- m_lastItem = m_items.last();
+ if (m_items.count()>0) {
+ m_lastItem = m_items.last();
+ } else {
+ m_lastItem = 0;
+ }
PlaylistItem*_it = currentItem();
if (m_lastItem) {