diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-02-10 21:58:47 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-02-10 21:58:47 +0100 |
commit | 63a9d77339c59198e8d658a8dab070992134f8fc (patch) | |
tree | 911e17cbbfbe85610bd11fc9e3f6443882773204 /src/plugins/irc | |
parent | 7c5016c79d7913581e22a0da3052f44a58acd8fb (diff) | |
download | weechat-63a9d77339c59198e8d658a8dab070992134f8fc.zip |
irc: fix crash in callback of message 354 when the nick is not found in channel
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index c68520cd7..87b1a7d5a 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -4300,11 +4300,14 @@ IRC_PROTOCOL_CALLBACK(354) } /* update account flag for nick */ - if (ptr_nick->account) - free (ptr_nick->account); - ptr_nick->account = (ptr_channel && ptr_nick && pos_account - && server->cap_account_notify) ? - strdup (pos_account) : strdup ("*"); + if (ptr_nick) + { + if (ptr_nick->account) + free (ptr_nick->account); + ptr_nick->account = (ptr_channel && pos_account + && server->cap_account_notify) ? + strdup (pos_account) : strdup ("*"); + } /* display output of who (manual who from user) */ if (!ptr_channel || (ptr_channel->checking_whox <= 0)) |