summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f507bd3)
raw | patch | inline | side by side (parent: f507bd3)
author | Max Kellermann <max.kellermann@gmail.com> | |
Tue, 17 Oct 2017 13:56:06 +0000 (15:56 +0200) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Tue, 17 Oct 2017 13:56:06 +0000 (15:56 +0200) |
Just in case mpd_glib_leave() has found an error and had to close the
connection, check it again to avoid an assertion failure (or crash) in
mpdclient_schedule_enter_idle().
Closes #9
connection, check it again to avoid an assertion failure (or crash) in
mpdclient_schedule_enter_idle().
Closes #9
NEWS | patch | blob | history | |
src/mpdclient.c | patch | blob | history |
index d809ad63d00c15d4a94990fae3e5ed21a8058153..ab2d153cc07cc3ad78b5309f2e6b724adef12ef0 100644 (file)
--- a/NEWS
+++ b/NEWS
ncmpc 0.29 - not yet released
+* fix crash after losing MPD connection
ncmpc 0.28 - (2017-09-21)
* fix crash on lyrics screen
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 6a81a0bd8ac20bd6cc2708f3438ad194a28ba643..1801ad2dc7973b94e927131f5bdd1c3a95127f7d 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
c->idle = false;
mpd_glib_leave(c->source);
- mpdclient_schedule_enter_idle(c);
+ if (c->source != NULL)
+ mpdclient_schedule_enter_idle(c);
}
return c->connection;