summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-01 23:32:21 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-01 23:32:21 +0000
commitbd91fbc88bd604fbf5fd61b2e0aa56b35738467a (patch)
tree7e4684399b777cf1ae324d4e71483a862cd00584 /src/irc
parentd322b86c3d92b671bfdda75e6cb743935868b18e (diff)
downloadirssi-bd91fbc88bd604fbf5fd61b2e0aa56b35738467a.zip
The "check if nick change was done with our /NICK" didn't work if this was
our first nick change.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2368 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/irc-nicklist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c
index 505eaadb..33fe31ae 100644
--- a/src/irc/core/irc-nicklist.c
+++ b/src/irc/core/irc-nicklist.c
@@ -312,7 +312,8 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
if (g_strcasecmp(orignick, server->nick) == 0) {
/* You changed your nick */
- if (g_strcasecmp(server->last_nick, nick) == 0) {
+ if (server->last_nick != NULL &&
+ g_strcasecmp(server->last_nick, nick) == 0) {
/* changed with /NICK - keep it as wanted nick */
g_free(server->connrec->nick);
server->connrec->nick = g_strdup(nick);