From: Max Kellermann Date: Mon, 20 Mar 2017 16:04:21 +0000 (+0100) Subject: main: check for strfsong() failure, add fallback X-Git-Tag: v0.27~40 X-Git-Url: https://git.tokkee.org/?p=ncmpc.git;a=commitdiff_plain;h=3a6dbcbef7ad9fff02ee01f8ed05ccf81bd9b6c2 main: check for strfsong() failure, add fallback --- diff --git a/src/main.c b/src/main.c index b67165f..72a9362 100644 --- a/src/main.c +++ b/src/main.c @@ -78,6 +78,9 @@ update_xterm_title(void) if (options.xterm_title_format && mpd->playing && song) strfsong(tmp, BUFSIZE, options.xterm_title_format, song); else + *tmp = 0; + + if (*tmp == 0) g_strlcpy(tmp, PACKAGE " version " VERSION, BUFSIZE); static char title[BUFSIZE];