diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-08-06 16:07:26 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-08-06 16:07:26 +0000 |
| commit | 467be1724973970bfad0e9e124bafb31466f08fd (patch) | |
| tree | 130404feee2737dd2b951d7025b740cd9b5ca7ee | |
| parent | e22c294cae50319df5b16ef9510c8390cdb204c6 (diff) | |
| download | qmmp-467be1724973970bfad0e9e124bafb31466f08fd.tar.gz qmmp-467be1724973970bfad0e9e124bafb31466f08fd.tar.bz2 qmmp-467be1724973970bfad0e9e124bafb31466f08fd.zip | |
fixed crash when deleting last track in the playlist
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3574 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/qmmpui/playlistmodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index c60c7da00..162e96312 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -371,6 +371,9 @@ void PlayListModel::removeSelection(bool inverted) else if (track->flag() == PlayListTrack::EDITING) track->setFlag(PlayListTrack::SCHEDULED_FOR_DELETION); + if(m_container.isEmpty()) + continue; + select_after_delete = i; if (m_current >= i && m_current > 0) |
