From 8dff3786174ec16680335ef4591ee1aaacf6a405 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Tue, 4 Oct 2016 06:47:30 +0200 Subject: Fix crash when not in debug mode --- nncmpp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nncmpp.c b/nncmpp.c index b38ef8e..96eeceb 100644 --- a/nncmpp.c +++ b/nncmpp.c @@ -1725,7 +1725,9 @@ app_on_reconnect (void *user_data) c->on_failure = mpd_on_failure; c->on_connected = mpd_on_connected; c->on_event = mpd_on_events; - c->on_io_hook = mpd_on_io_hook; + + if (g_debug_mode) + c->on_io_hook = mpd_on_io_hook; // We accept hostname/IPv4/IPv6 in pseudo-URL format, as well as sockets char *address = xstrdup (get_config_string (g_ctx.config.root, -- cgit v1.2.3-70-g09d2