From bd6d6b0df0dace05cc21076f710bddb12339f78f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 29 Sep 2009 18:20:38 +0200 Subject: [PATCH] mpdclient: abort ncmpc if out of memory When mpd_connection_new() returns NULL, there's not much we can do. --- src/mpdclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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), -- 2.30.2