From: Max Kellermann Date: Tue, 29 Sep 2009 16:20:38 +0000 (+0200) Subject: mpdclient: abort ncmpc if out of memory X-Git-Tag: release-0.16~315 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bd6d6b0df0dace05cc21076f710bddb12339f78f;p=ncmpc.git mpdclient: abort ncmpc if out of memory When mpd_connection_new() returns NULL, there's not much we can do. --- diff --git a/src/mpdclient.c b/src/mpdclient.c index 14e13fc..c0d11af 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -217,7 +217,7 @@ mpdclient_connect(struct mpdclient *c, /* connect to MPD */ c->connection = mpd_connection_new(host, port, _timeout * 1000); if (c->connection == NULL) - return error_cb(c, MPD_ERROR_OOM, "Out of memory"); + g_error("Out of memory"); if (mpd_connection_get_error(c->connection) != MPD_ERROR_SUCCESS) { retval = error_cb(c, mpd_connection_get_error(c->connection),