summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4a8a5bc)
raw | patch | inline | side by side (parent: 4a8a5bc)
author | Max Kellermann <max@duempel.org> | |
Sun, 13 Sep 2009 10:07:22 +0000 (12:07 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sun, 13 Sep 2009 10:07:22 +0000 (12:07 +0200) |
Don't attempt to call MPD when there is no connection.
src/screen_outputs.c | patch | blob | history | |
src/screen_search.c | patch | blob | history |
diff --git a/src/screen_outputs.c b/src/screen_outputs.c
index 9b6fa87bc80e4a61f47bf3a40ee41e2e2d330a11..4e55df9fe131fa8927ba89e6114a9f7fe6488404 100644 (file)
--- a/src/screen_outputs.c
+++ b/src/screen_outputs.c
assert(mpd_outputs != NULL);
+ if (c->connection == NULL)
+ return;
+
mpd_sendOutputsCommand(c->connection);
while ((output = mpd_getNextOutput(c->connection)) != NULL) {
g_ptr_array_add(mpd_outputs, output);
diff --git a/src/screen_search.c b/src/screen_search.c
index b8ebbd50927bfcbf9ba49180046b3020cc4f45e1..12bc5f92af755d69c563a0e3832eb06c2420843a 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
static void
search_new(mpdclient_t *c)
{
+ if (c->connection == NULL)
+ return;
+
search_clear(c, TRUE);
g_free(pattern);