From 4442f2bb7b5e2ea0b24f63ca5d455cc0fba0e7ac Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 1 Feb 2009 16:41:32 +0100 Subject: [PATCH] fix 'crop' function when mpd was stopped --- src/ncmpcpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index cd4557ad..e64b4ce7 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -3114,7 +3114,7 @@ int main(int argc, char *argv[]) } // if mpd deletes now playing song deletion will be sluggishly slow // then so we have to assure it will be deleted at the very end. - if (!mPlaylist->isSelected(now_playing)) + if (now_playing >= 0 && !mPlaylist->isSelected(now_playing)) Mpd->QueueDeleteSongId(mPlaylist->at(now_playing).GetID()); ShowMessage("Deleting all items but selected...");