Skip to content

Commit

Permalink
cmd_chat_list_finish: fix crash when plugins provide NULL room titles
Browse files Browse the repository at this point in the history
  • Loading branch information
dequis committed Nov 23, 2017
1 parent 49108f3 commit 4a9c6b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion root_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4a9c6b0

Please sign in to comment.