mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
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
This commit is contained in:
parent
372903e72e
commit
0fe183b8c9
@ -104,7 +104,8 @@ CHAT_DCC_REC *dcc_chat_find_id(const char *id)
|
|||||||
for (tmp = dcc_conns; tmp != NULL; tmp = tmp->next) {
|
for (tmp = dcc_conns; tmp != NULL; tmp = tmp->next) {
|
||||||
CHAT_DCC_REC *dcc = tmp->data;
|
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;
|
return dcc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -783,6 +784,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
|
|||||||
|
|
||||||
/* change the id too */
|
/* change the id too */
|
||||||
g_free(dcc->id);
|
g_free(dcc->id);
|
||||||
|
dcc->id = NULL;
|
||||||
dcc->id = dcc_chat_get_new_id(nick);
|
dcc->id = dcc_chat_get_new_id(nick);
|
||||||
|
|
||||||
if (query != NULL) {
|
if (query != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user