summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-command.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-03-19 10:15:16 +0100
committerSébastien Helleu <flashcode@flashtux.org>2022-03-19 10:15:16 +0100
commit8123cb3e0b1d390531cec20c7808f473b0d4a6d3 (patch)
tree98754788590b82f3131cb7a991b27f01444311c0 /src/plugins/irc/irc-command.c
parent15e11ecc0c480a4b3388fb398deb6f61db94de2f (diff)
downloadweechat-8123cb3e0b1d390531cec20c7808f473b0d4a6d3.zip
irc: ensure old_autojoin and ptr_autojoin are not NULL before comparing them
Diffstat (limited to 'src/plugins/irc/irc-command.c')
-rw-r--r--src/plugins/irc/irc-command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index c2241f34a..9f1aa1d34 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -1006,7 +1006,8 @@ end:
ptr_autojoin = IRC_SERVER_OPTION_STRING(ptr_server,
IRC_SERVER_OPTION_AUTOJOIN);
if ((old_autojoin && !ptr_autojoin) || (!old_autojoin && ptr_autojoin)
- || (strcmp (old_autojoin, ptr_autojoin) != 0))
+ || (old_autojoin && ptr_autojoin
+ && (strcmp (old_autojoin, ptr_autojoin) != 0)))
{
if (old_autojoin && old_autojoin[0])
{