From 4772bd1865f7bdce4642d6f8559ab12fb7d0b3a5 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 25 Feb 2009 19:13:47 +0100 Subject: [PATCH] Fix bug with reset of topic for irc channel / jabber muc --- src/plugins/irc/irc-channel.c | 3 ++- src/plugins/jabber/jabber-muc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 7f06e0939..eae5a1238 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -200,7 +200,8 @@ irc_channel_set_topic (struct t_irc_channel *channel, const char *topic) free (channel->topic); channel->topic = (topic) ? strdup (topic) : NULL; - weechat_buffer_set (channel->buffer, "title", channel->topic); + weechat_buffer_set (channel->buffer, "title", + (channel->topic) ? channel->topic : ""); } /* diff --git a/src/plugins/jabber/jabber-muc.c b/src/plugins/jabber/jabber-muc.c index dd24d2e26..74eb84ef3 100644 --- a/src/plugins/jabber/jabber-muc.c +++ b/src/plugins/jabber/jabber-muc.c @@ -183,7 +183,7 @@ jabber_muc_set_topic (struct t_jabber_muc *muc, const char *topic) free (muc->topic); muc->topic = (topic) ? strdup (topic) : NULL; - weechat_buffer_set (muc->buffer, "title", muc->topic); + weechat_buffer_set (muc->buffer, "title", (muc->topic) ? muc->topic : ""); } /*