summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-10-16 07:57:40 +0200
committerSebastien Helleu <flashcode@flashtux.org>2010-10-16 07:57:40 +0200
commit880163d78401d37956295067e5671e1d112cff6e (patch)
tree3c87ae6839fc4a11354f4a693dbb2f5643203d4d /src/plugins/irc
parentee3706073489145b7c4c001f9d8f4e748be85d39 (diff)
downloadweechat-880163d78401d37956295067e5671e1d112cff6e.zip
Fix crash when channel topic is removed if it was already empty (if option irc.look.display_old_topic is on)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-protocol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 2741509a6..118b9e6ab 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -1817,7 +1817,8 @@ IRC_PROTOCOL_CALLBACK(topic)
}
else
{
- if (weechat_config_boolean (irc_config_look_display_old_topic))
+ if (weechat_config_boolean (irc_config_look_display_old_topic)
+ && ptr_channel && ptr_channel->topic && ptr_channel->topic[0])
{
old_topic_color = irc_color_decode (ptr_channel->topic,
weechat_config_boolean (irc_config_network_colors_receive));