summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba041d0)
raw | patch | inline | side by side (parent: ba041d0)
author | Max Kellermann <max@duempel.org> | |
Wed, 17 Sep 2008 05:21:30 +0000 (07:21 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 17 Sep 2008 05:21:30 +0000 (07:21 +0200) |
Instead of freeing the playlist with mpdclient_playlist_free(), call
playlist_clear() to empty the song list. This fixes a segmentation
fault which occured when you cleared the playlist.
playlist_clear() to empty the song list. This fixes a segmentation
fault which occured when you cleared the playlist.
src/mpdclient.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 7c2cd32f76e3062e1e374124a6cdc991a65f600e..58a3e8fb7152e4a48d0c6a7ec2338bbd0709a495 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
if (MPD_ERROR(c))
return -1;
- if (c->playlist.list)
- mpdclient_playlist_free(&c->playlist);
+ playlist_clear(&c->playlist);
mpd_sendPlaylistInfoCommand(c->connection,-1);
while ((entity = mpd_getNextInfoEntity(c->connection))) {