From 4a9c6b0b15eb3738897dc1635fda2e4be67414ad Mon Sep 17 00:00:00 2001 From: dequis Date: Thu, 23 Nov 2017 17:57:04 -0300 Subject: cmd_chat_list_finish: fix crash when plugins provide NULL room titles --- root_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 1cbf462f..957c9518 100644 --- a/root_commands.c +++ b/root_commands.c @@ -1439,7 +1439,7 @@ void cmd_chat_list_finish(struct im_connection *ic) ci = l->data; topic = ci->topic ? ci->topic : ""; - padded = str_pad_and_truncate(ci->title, title_len, "[...]"); + padded = str_pad_and_truncate(ci->title ? ci->title : "", title_len, "[...]"); irc_rootmsg(irc, iformat, ++i, padded, topic); g_free(padded); } -- cgit v1.2.3