From 3a6dbcbef7ad9fff02ee01f8ed05ccf81bd9b6c2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 20 Mar 2017 17:04:21 +0100 Subject: [PATCH] main: check for strfsong() failure, add fallback --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) 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]; -- 2.30.2