summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3355481)
raw | patch | inline | side by side (parent: 3355481)
author | Max Kellermann <max@duempel.org> | |
Wed, 1 Aug 2012 08:11:52 +0000 (10:11 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 1 Aug 2012 08:11:52 +0000 (10:11 +0200) |
NEWS | patch | blob | history | |
src/screen_search.c | patch | blob | history |
index ab2d7b58aeaf5a528df6d7b9b645fb55ff9147c9..59ee50855cc40bc3ed4554be1c1f7d72f3710c03 100644 (file)
--- a/NEWS
+++ b/NEWS
ncmpc 0.21 - not yet released
* add a chat screen for communication with other clients on the same server
* song format: evaluate literal strings as true
+* fix crash on search screen when disconnected
ncmpc 0.20 - (02/05/2012)
diff --git a/src/screen_search.c b/src/screen_search.c
index 81ca8e4840c3fe7e9a71e753575146b152c78fad..3abda9d9c574e116c5e417043f100f866250a1ef 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
do_search(struct mpdclient *c, char *query)
{
struct mpd_connection *connection = mpdclient_get_connection(c);
- struct filelist *fl;
+ if (connection == NULL)
+ return NULL;
- fl = search_advanced_query(connection, query);
+ struct filelist *fl = search_advanced_query(connection, query);
if (fl != NULL)
return fl;