summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2004-07-11 15:55:27 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2004-07-11 15:55:27 +0000
commit0fe183b8c94061601416e35f28b755ca41303a12 (patch)
treecf195eda46b4e6044737f3b5eb73204db007d3f4 /src
parent372903e72e36f48aa2eb67c9b1ce6b44689b5bc9 (diff)
downloadirssi-0fe183b8c94061601416e35f28b755ca41303a12.zip
Don't crash if dcc chated user changes nick
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3265 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/irc/dcc/dcc-chat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c
index c1eeafca..6281d252 100644
--- a/src/irc/dcc/dcc-chat.c
+++ b/src/irc/dcc/dcc-chat.c
@@ -104,7 +104,8 @@ CHAT_DCC_REC *dcc_chat_find_id(const char *id)
for (tmp = dcc_conns; tmp != NULL; tmp = tmp->next) {
CHAT_DCC_REC *dcc = tmp->data;
- if (IS_DCC_CHAT(dcc) && g_strcasecmp(dcc->id, id) == 0)
+ if (IS_DCC_CHAT(dcc) && dcc->id != NULL &&
+ g_strcasecmp(dcc->id, id) == 0)
return dcc;
}
@@ -783,6 +784,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
/* change the id too */
g_free(dcc->id);
+ dcc->id = NULL;
dcc->id = dcc_chat_get_new_id(nick);
if (query != NULL) {