From 12ee01660739b19fa9b0c112e6a6b266a4e2d6a8 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Sun, 11 Apr 2004 01:53:25 +0000 Subject: make "update" command background/non-blocking git-svn-id: https://svn.musicpd.org/mpd/trunk@665 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/playlist.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/playlist.c') diff --git a/src/playlist.c b/src/playlist.c index 957a4a748..856dea8fa 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -144,7 +144,9 @@ void finishPlaylist() { stopPlaylist(stderr); clearPlaylist(stderr); free(playlist.songs); + playlist.songs = NULL; free(playlist.order); + playlist.order = NULL; } int clearPlaylist(FILE * fp) { @@ -626,6 +628,8 @@ int deleteFromPlaylist(FILE * fp, int song) { void deleteASongFromPlaylist(Song * song) { int i; + + if(NULL==playlist.songs) return; for(i=0;i