diff options
Diffstat (limited to '')
-rw-r--r-- | src/playlist.c | 4 |
1 files changed, 4 insertions, 0 deletions
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<playlist.length;i++) { if(song==playlist.songs[i]) { |