diff --git a/src/irc/core/irc-queries.c b/src/irc/core/irc-queries.c index 5592ede7..0ca1b94e 100644 --- a/src/irc/core/irc-queries.c +++ b/src/irc/core/irc-queries.c @@ -57,7 +57,8 @@ static void check_query_changes(IRC_SERVER_REC *server, const char *nick, query_change_nick(query, nick); } - if (query->address == NULL || strcmp(query->address, address) != 0) { + if (address != NULL && (query->address == NULL || + strcmp(query->address, address) != 0)) { /* host changed */ query_change_address(query, address); }