Code

mpdclient: abort ncmpc if out of memory
authorMax Kellermann <max@duempel.org>
Tue, 29 Sep 2009 16:20:38 +0000 (18:20 +0200)
committerMax Kellermann <max@duempel.org>
Tue, 29 Sep 2009 16:20:38 +0000 (18:20 +0200)
When mpd_connection_new() returns NULL, there's not much we can do.

src/mpdclient.c

index 14e13fc4b03e417ef74bef07cc693a3a5fdf5871..c0d11afb47c6ea54e83b9544a5fa5a2419d68000 100644 (file)
@@ -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),