Code

screen_browser: check for error before adding song to playlist
authorMax Kellermann <max@duempel.org>
Sat, 19 Jun 2010 11:05:02 +0000 (13:05 +0200)
committerMax Kellermann <max@duempel.org>
Sat, 19 Jun 2010 11:05:02 +0000 (13:05 +0200)
commit2a400039ea3adeec43a927e606e5f6d78e012988
treee2fc773eca6802586def14eb9e964c58451d94f1
parent9f5977b6a3dde154019ddbfd56e9bb92bf51ba7f
screen_browser: check for error before adding song to playlist

The function enqueue_and_play() may cause an assertion failure,
because it evaluates the filelist_entry object after
mpdclient_get_connection() call.  However, mpdclient_get_connection() may
indirectly invalidate the filelist_entry object, when it sees that the
connection has become invalid; it will return a NULL connection then.
This results in an assertion failure or a segmentation fault.
NEWS
src/screen_browser.c